Beispiel #1
0
static void testClassList() {
    ClassList classes;
    size_t i;
    char * name;
    const char * input[] = { "a", "b", "c", "d", "e", "f", "g", "h",
        "i", "j", "k", "l", "m", "n", "o", "p",
        "q", "r", "s", "t", "u", "v", "w", "x"};

    classes = classes_create(NULL, "class table");
    
    for (i = 0; i < 24; i++) {
        name = malloc(2);
        strcpy(name, input[i]);
        classes_add(classes, name, (jint) i+1, (jint) i+2);
    }
    
    classes_visit(classes, NULL, NULL, &class_visitor);
    
    for (i = 1; i <= 24; i++) {
        classes_remove(classes, (jint) i);
    }
    
    classes_visit(classes, NULL, NULL, &class_visitor);
    
    classes_destroy(classes);
    
    printf("Class Tests: %llu/%llu assertions passed\n", passed, count);
    passed = 0;
    count = 0;
}
Beispiel #2
0
void Glulxe::glulxe_classtable_unregister(void *obj, uint objclass,
        gidispatch_rock_t objrock) {
	classes_remove(objclass, obj);
}
Beispiel #3
0
static void glulxe_classtable_unregister(void *obj, glui32 objclass, 
  gidispatch_rock_t objrock)
{
  classes_remove(objclass, obj);
}