Added primitive unit testing in tests/
This commit is contained in:
11
tests/stdlib_atoi.c
Normal file
11
tests/stdlib_atoi.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "stdlib.h"
|
||||
|
||||
#define NULL 0x00
|
||||
|
||||
int main(void)
|
||||
{
|
||||
if ( atoi("1234\0") != 1234 ) return 1;
|
||||
if ( atoi("65536\0") != 65536 ) return 2;
|
||||
if ( atoi("-32767\0") != -32767 ) return 3;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user