- Timestamp:
- Mar 5, 2011, 3:25:29 PM (13 years ago)
- Branches:
- master, release-1.10, release-1.8, release-1.9
- Children:
- e3a75ed
- Parents:
- 9620c8d
- git-author:
- David Benjamin <davidben@mit.edu> (02/28/11 10:53:18)
- git-committer:
- David Benjamin <davidben@mit.edu> (03/05/11 15:25:29)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tester.c
rddbbcffa r010a951 269 269 owl_vardict vd; 270 270 int numfailed=0; 271 char buf[1024];271 char *value; 272 272 const void *v; 273 273 … … 277 277 FAIL_UNLESS("get bool", 0==owl_variable_get_bool(&vd,"rxping")); 278 278 FAIL_UNLESS("get bool (no such)", -1==owl_variable_get_bool(&vd,"mumble")); 279 FAIL_UNLESS("get bool as string 1", 0==owl_variable_get_tostring(&vd,"rxping", buf, 1024)); 280 FAIL_UNLESS("get bool as string 2", 0==strcmp(buf,"off")); 279 FAIL_UNLESS("get bool as string", 280 !strcmp((value = owl_variable_get_tostring(&vd,"rxping")), "off")); 281 g_free(value); 281 282 FAIL_UNLESS("set bool 1", 0==owl_variable_set_bool_on(&vd,"rxping")); 282 283 FAIL_UNLESS("get bool 2", 1==owl_variable_get_bool(&vd,"rxping")); … … 293 294 FAIL_UNLESS("get int", 8==owl_variable_get_int(&vd,"typewinsize")); 294 295 FAIL_UNLESS("get int (no such)", -1==owl_variable_get_int(&vd,"mmble")); 295 FAIL_UNLESS("get int as string 1", 0==owl_variable_get_tostring(&vd,"typewinsize", buf, 1024)); 296 FAIL_UNLESS("get int as string 2", 0==strcmp(buf,"8")); 296 FAIL_UNLESS("get int as string", 297 !strcmp((value = owl_variable_get_tostring(&vd,"typewinsize")), "8")); 298 g_free(value); 297 299 FAIL_UNLESS("set int 1", 0==owl_variable_set_int(&vd,"typewinsize",12)); 298 300 FAIL_UNLESS("get int 2", 12==owl_variable_get_int(&vd,"typewinsize"));
Note: See TracChangeset
for help on using the changeset viewer.