version 1.1 | | version 1.2 |
---|
| | |
/* | | /* |
* static char *rcsid_check_shstr_c = | | * static char *rcsid_check_shstr_c = |
* "$Id: check_shstr.c,v 1.1 2006/03/21 22:46:08 tchize Exp $"; | | * "$Id: check_shstr.c,v 1.2 2006/03/23 19:39:14 tchize Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
{ | | { |
const char * str1; | | const char * str1; |
const char * str2; | | const char * str2; |
str2 = add_string(str1); | | str1 = add_string("Crossfire Rulez"); |
| | str2 = add_refcount(str1); |
fail_unless(str1==str2, "result of add_refcount (%p) should be the same as original pointer (%p).",str2,str1); | | fail_unless(str1==str2, "result of add_refcount (%p) should be the same as original pointer (%p).",str2,str1); |
| | fail_unless(query_refcount(str1)==2, |
| | "add_refcount (%p) should have made refcount to value 2 but was %d", |
| | str1,query_refcount(str1)); |
} | | } |
END_TEST | | END_TEST |
| | |