Add tests for stdlib

This commit is contained in:
2016-03-27 12:42:42 -07:00
parent 3000e7e9fb
commit 9fefff9edf
10 changed files with 91 additions and 2 deletions

19
tests/stdlib_isdigit.c Normal file
View File

@@ -0,0 +1,19 @@
#include "stdlib.h"
#define NULL 0x00
int main(void)
{
if ( isdigit((int)'0') != 1 ) return 1;
if ( isdigit((int)'1') != 1 ) return 2;
if ( isdigit((int)'2') != 1 ) return 3;
if ( isdigit((int)'3') != 1 ) return 4;
if ( isdigit((int)'4') != 1 ) return 5;
if ( isdigit((int)'5') != 1 ) return 6;
if ( isdigit((int)'6') != 1 ) return 7;
if ( isdigit((int)'7') != 1 ) return 8;
if ( isdigit((int)'8') != 1 ) return 9;
if ( isdigit((int)'9') != 1 ) return 10;
if ( isdigit((int)'a') != 0 ) return 11;
return 0;
}