to_int.c
ds2.10/fluffos-2.16-ds05/testsuite/single/tests/efuns/to_int.c · 214 B
From the archive ds2.10.zip
Download the archive « Back to the archive contents
void do_tests() {
int i = 5;
float f = 6.7;
i = to_int(f);
ASSERT(i == 6);
i = f;
ASSERT(i == 6);
i = to_int("7");
ASSERT(i == 7);
i = to_int("ajdfj");
ASSERT(i == 0);
}