diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2009-02-17 18:15:49 +0100 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2009-02-17 18:15:49 +0100 |
commit | 0897131e51e513954ee5d9900e57ca9b2906bf39 (patch) | |
tree | a3b228c36c232f47d5a0a59b37985bfca5173523 /tests/port | |
parent | 7dd9fc654c692f23bf88f43c520a0cc8414e2fc1 (diff) | |
download | wolfbones-0897131e51e513954ee5d9900e57ca9b2906bf39.tar.gz wolfbones-0897131e51e513954ee5d9900e57ca9b2906bf39.tar.bz2 |
made sure strdup is tested correctly
Diffstat (limited to 'tests/port')
-rw-r--r-- | tests/port/test_strdup.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/port/test_strdup.c b/tests/port/test_strdup.c index fd1c843..557aa03 100644 --- a/tests/port/test_strdup.c +++ b/tests/port/test_strdup.c @@ -8,7 +8,11 @@ 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; free( d ); - exit( EXIT_SUCCESS ); + + exit( res ); } |