Added primitive unit testing in tests/

This commit is contained in:
2016-03-27 12:07:53 -07:00
parent 6642358073
commit 25e3b5c517
6 changed files with 62 additions and 1 deletions

11
tests/stdlib_atoi.c Normal file
View 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;
}