diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2009-02-22 19:21:48 +0100 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2009-02-22 19:21:48 +0100 |
commit | 7da6a6353bd0e93da3be913345777de96589adda (patch) | |
tree | f1a4a2bcd2622f6328896456a9972f32b6b7b239 /tests/port/test_strdup.c | |
parent | 72fc4fc728f28306afe74cc6d4d6f2e345aea67b (diff) | |
download | wolfbones-7da6a6353bd0e93da3be913345777de96589adda.tar.gz wolfbones-7da6a6353bd0e93da3be913345777de96589adda.tar.bz2 |
fixed all porting tests (compile always with both versions, the one of the platform and the stub)
Diffstat (limited to 'tests/port/test_strdup.c')
-rw-r--r-- | tests/port/test_strdup.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/port/test_strdup.c b/tests/port/test_strdup.c index 557aa03..1853404 100644 --- a/tests/port/test_strdup.c +++ b/tests/port/test_strdup.c @@ -8,11 +8,13 @@ int main( void ) { const char *s = "test"; - int res = EXIT_SUCCESS; - char *d = wolf_port_strdup( s ); - - if( strcmp( s, d ) != 0 ) res = EXIT_FAILURE; + char *d = strdup( s ); + char *d2 = wolf_port_strdup( s ); + + if( strcmp( s, d ) != 0 ) return EXIT_FAILURE; + if( strcmp( d, d2 ) != 0 ) return EXIT_FAILURE; free( d ); + free( d2 ); - exit( res ); + return EXIT_SUCCESS; } |