Files
RedBear-OS/tests/stdlib/a64l.c
T
Tibor Nagy 4381bb2a22 tests: Remove redundant return statements
When the execution reaches the end of the main functions, they implicitly return a successful status.
2019-02-20 21:09:03 +01:00

22 lines
520 B
C

#include <stdlib.h>
#include <stdio.h>
int main(void) {
char * s = "azAZ9."; // test boundaries
long l = a64l(s);
if (l != 194301926) {
printf("Invalid result: a64l(%s) = %ld\n", s, l);
return EXIT_FAILURE;
}
printf("Correct a64l: %s = %ld\n", s, l);
s = "azA"; // test null terminated string
l = a64l(s);
if (l != 53222) {
printf("Invalid result: a64l(%s) = %ld\n", s, l);
return EXIT_FAILURE;
}
printf("Correct a64l: %s = %ld\n", s, l);
}