Changeset 353719a for tester.c


Ignore:
Timestamp:
Feb 19, 2013, 8:29:04 PM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10
Children:
5001a3d
Parents:
06e04a9
git-author:
David Benjamin <davidben@mit.edu> (06/09/12 16:07:20)
git-committer:
David Benjamin <davidben@mit.edu> (02/19/13 20:29:04)
Message:
Start of perlvariables iteration N+1

New plan: the C <-> perl interface deals entirely with strings. Storage
is entirely perl-side. C does not know and doesn't care about the
underlying perl-side types. Note that this means an "int" variable in C
land and an "int" variable in perl land have no relation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tester.c

    r6a20996 r353719a  
    337337  int numfailed=0;
    338338  char *value;
    339   const void *v;
    340339
    341340  printf("# BEGIN testing owl_variable\n");
     
    379378  owl_variable_dict_newvar_string(&vd, "stringvar", "", "", "testval");
    380379  FAIL_UNLESS("get new string var", NULL != (var = owl_variable_get_var(&vd, "stringvar")));
    381   FAIL_UNLESS("get new string var", NULL != (v = owl_variable_get(var)));
    382380  FAIL_UNLESS("get new string val", !strcmp("testval", owl_variable_get_string(var)));
    383381  owl_variable_set_string(var, "new val");
     
    386384  owl_variable_dict_newvar_int(&vd, "intvar", "", "", 47);
    387385  FAIL_UNLESS("get new int var", NULL != (var = owl_variable_get_var(&vd, "intvar")));
    388   FAIL_UNLESS("get new int var", NULL != (v = owl_variable_get(var)));
    389386  FAIL_UNLESS("get new int val", 47 == owl_variable_get_int(var));
    390387  owl_variable_set_int(var, 17);
     
    393390  owl_variable_dict_newvar_bool(&vd, "boolvar", "", "", 1);
    394391  FAIL_UNLESS("get new bool var", NULL != (var = owl_variable_get_var(&vd, "boolvar")));
    395   FAIL_UNLESS("get new bool var", NULL != (v = owl_variable_get(var)));
    396392  FAIL_UNLESS("get new bool val", owl_variable_get_bool(var));
    397393  owl_variable_set_bool_off(var);
Note: See TracChangeset for help on using the changeset viewer.