- "cannot compare null value object and integer value object");
- ok(!bt_value_compare(int1,
- int2),
- "integer value objects are not equivalent (10 and -23)");
- ok(bt_value_compare(int1,
- int3),
- "integer value objects are equivalent (10 and 10)");
-
- BT_OBJECT_PUT_REF_AND_RESET(int1);
- BT_OBJECT_PUT_REF_AND_RESET(int2);
- BT_OBJECT_PUT_REF_AND_RESET(int3);
+ "cannot compare null value object and unsigned integer value object");
+ ok(!bt_value_compare(int1, int2),
+ "unsigned integer value objects are not equivalent (10 and 23)");
+ ok(bt_value_compare(int1, int3),
+ "unsigned integer value objects are equivalent (10 and 10)");
+
+ BT_VALUE_PUT_REF_AND_RESET(int1);
+ BT_VALUE_PUT_REF_AND_RESET(int2);
+ BT_VALUE_PUT_REF_AND_RESET(int3);
+}
+
+void test_compare_signed_integer(void)
+{
+ bt_value *int1 =
+ bt_value_integer_signed_create_init(10);
+ bt_value *int2 =
+ bt_value_integer_signed_create_init(-23);
+ bt_value *int3 =
+ bt_value_integer_signed_create_init(10);
+
+ BT_ASSERT(int1 && int2 && int3);
+ ok(!bt_value_compare(bt_value_null,
+ int1),
+ "cannot compare null value object and signed integer value object");
+ ok(!bt_value_compare(int1, int2),
+ "signed integer value objects are not equivalent (10 and -23)");
+ ok(bt_value_compare(int1, int3),
+ "signed integer value objects are equivalent (10 and 10)");
+
+ BT_VALUE_PUT_REF_AND_RESET(int1);
+ BT_VALUE_PUT_REF_AND_RESET(int2);
+ BT_VALUE_PUT_REF_AND_RESET(int3);