Changeset 1a4508b


Ignore:
Timestamp:
Feb 21, 2013, 4:42:20 PM (8 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master
Children:
f41956d
Parents:
4584d1f
git-author:
David Benjamin <davidben@mit.edu> (06/10/12 15:06:27)
git-committer:
David Benjamin <davidben@mit.edu> (02/21/13 16:42:20)
Message:
Fix the unit tests

The arguments got reordered slightly to match the nasty macros.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tester.c

    r353719a r1a4508b  
    376376  FAIL_UNLESS("get int 7", 9 == owl_variable_get_int(var));
    377377
    378   owl_variable_dict_newvar_string(&vd, "stringvar", "", "", "testval");
     378  owl_variable_dict_newvar_string(&vd, "stringvar", "testval", "", "");
    379379  FAIL_UNLESS("get new string var", NULL != (var = owl_variable_get_var(&vd, "stringvar")));
    380380  FAIL_UNLESS("get new string val", !strcmp("testval", owl_variable_get_string(var)));
     
    382382  FAIL_UNLESS("update string val", !strcmp("new val", owl_variable_get_string(var)));
    383383
    384   owl_variable_dict_newvar_int(&vd, "intvar", "", "", 47);
     384  owl_variable_dict_newvar_int(&vd, "intvar", 47, "", "");
    385385  FAIL_UNLESS("get new int var", NULL != (var = owl_variable_get_var(&vd, "intvar")));
    386386  FAIL_UNLESS("get new int val", 47 == owl_variable_get_int(var));
     
    388388  FAIL_UNLESS("update int val", 17 == owl_variable_get_int(var));
    389389
    390   owl_variable_dict_newvar_bool(&vd, "boolvar", "", "", 1);
     390  owl_variable_dict_newvar_bool(&vd, "boolvar", true, "", "");
    391391  FAIL_UNLESS("get new bool var", NULL != (var = owl_variable_get_var(&vd, "boolvar")));
    392392  FAIL_UNLESS("get new bool val", owl_variable_get_bool(var));
     
    394394  FAIL_UNLESS("update bool val", !owl_variable_get_bool(var));
    395395
    396   owl_variable_dict_newvar_string(&vd, "nullstringvar", "", "", NULL);
     396  owl_variable_dict_newvar_string(&vd, "nullstringvar", NULL, "", "");
    397397  FAIL_UNLESS("get new string (NULL) var", NULL != (var = owl_variable_get_var(&vd, "nullstringvar")));
    398398  FAIL_UNLESS("get string (NULL)", NULL == (value = owl_variable_get_tostring(var)));
Note: See TracChangeset for help on using the changeset viewer.