test: ds: update to use new object system
This commit is contained in:
@@ -15,6 +15,6 @@ int main(void)
|
||||
printf("object %p\n", it.value);
|
||||
}
|
||||
|
||||
b_array_release(array);
|
||||
b_array_unref(array);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ static void test_string_create(CuTest *tc)
|
||||
CuAssertIntEquals(tc, 0, b_string_get_size(str, B_STRLEN_NORMAL));
|
||||
CuAssertStrEquals(tc, "", b_string_ptr(str));
|
||||
|
||||
b_string_release(str);
|
||||
b_string_unref(str);
|
||||
|
||||
str = b_string_create_from_c('A', 8);
|
||||
|
||||
@@ -17,7 +17,7 @@ static void test_string_create(CuTest *tc)
|
||||
CuAssertIntEquals(tc, 8, b_string_get_size(str, B_STRLEN_NORMAL));
|
||||
CuAssertStrEquals(tc, "AAAAAAAA", b_string_ptr(str));
|
||||
|
||||
b_string_release(str);
|
||||
b_string_unref(str);
|
||||
|
||||
str = b_string_create_from_cstr("Hello, world!");
|
||||
|
||||
@@ -25,7 +25,7 @@ static void test_string_create(CuTest *tc)
|
||||
CuAssertIntEquals(tc, 13, b_string_get_size(str, B_STRLEN_NORMAL));
|
||||
CuAssertStrEquals(tc, "Hello, world!", b_string_ptr(str));
|
||||
|
||||
b_string_release(str);
|
||||
b_string_unref(str);
|
||||
}
|
||||
|
||||
static void test_string_length(CuTest *tc)
|
||||
@@ -36,7 +36,7 @@ static void test_string_length(CuTest *tc)
|
||||
CuAssertIntEquals(tc, 13, b_string_get_size(s, B_STRLEN_IGNORE_ESC));
|
||||
CuAssertIntEquals(tc, 20, b_string_get_size(s, B_STRLEN_NORMAL));
|
||||
|
||||
b_string_release(s);
|
||||
b_string_unref(s);
|
||||
}
|
||||
|
||||
CuSuite *get_all_tests(void)
|
||||
|
||||
@@ -6,6 +6,6 @@ int main(void)
|
||||
b_number *number = b_number_create_float(6.8);
|
||||
|
||||
printf("number=%zd\n", B_NUMBER_IVAL(number));
|
||||
b_number_release(number);
|
||||
b_number_unref(number);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ int main(void)
|
||||
b_string_get_capacity(str));
|
||||
printf("-------------\n");
|
||||
|
||||
b_string_release(str);
|
||||
b_string_unref(str);
|
||||
|
||||
b_stringstream strv;
|
||||
b_stringstream_begin_dynamic(&strv);
|
||||
|
||||
@@ -33,7 +33,7 @@ int main(void)
|
||||
b_dict_foreach(&it, dict)
|
||||
{
|
||||
printf("item %zu: %s=%d\n", it.i, b_string_ptr(it.key),
|
||||
b_number_get_int(B_NUMBER(it.value)));
|
||||
b_number_get_int(it.value));
|
||||
}
|
||||
|
||||
b_tree *tree = b_tree_create();
|
||||
@@ -112,8 +112,8 @@ int main(void)
|
||||
printf("%d\n", item->value);
|
||||
}
|
||||
|
||||
b_tree_release(tree);
|
||||
b_dict_release(dict);
|
||||
b_tree_unref(tree);
|
||||
b_dict_unref(dict);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,6 @@ int main(void)
|
||||
b_uuid_to_cstr(uuid, str);
|
||||
printf("%s\n", str);
|
||||
|
||||
b_uuid_release(uuid);
|
||||
b_uuid_unref(uuid);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user