summaryrefslogtreecommitdiffstats
path: root/tests/testrecord.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2012-12-11 14:24:25 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2012-12-11 18:28:00 +0100
commitf0e95298b10bad066e895928e0e917dc543471cc (patch)
tree61a0692237667bacf04b8d1e783dd701d8d21381 /tests/testrecord.c
parent90268e748868a15ae100f69949b6a3214f0fd6b9 (diff)
downloadmsitools-f0e95298b10bad066e895928e0e917dc543471cc.tar.gz
msitools-f0e95298b10bad066e895928e0e917dc543471cc.tar.xz
msitools-f0e95298b10bad066e895928e0e917dc543471cc.zip
libmsi-types: s/MSI_NULL_INTEGER/LIBMSI_NULL_INT
So that it uses the same namespace prefix.
Diffstat (limited to 'tests/testrecord.c')
-rw-r--r--tests/testrecord.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/testrecord.c b/tests/testrecord.c
index 811f41e..2800039 100644
--- a/tests/testrecord.c
+++ b/tests/testrecord.c
@@ -72,7 +72,7 @@ static void test_msirecord(void)
r = libmsi_record_is_null(0, 0);
ok(r==0, "invalid handle not considered to be non-null...\n");
r = libmsi_record_get_integer(0,0);
- ok(r == MSI_NULL_INTEGER, "got integer from invalid record\n");
+ ok(r == LIBMSI_NULL_INT, "got integer from invalid record\n");
r = libmsi_record_set_int(0,0,0);
ok(r == LIBMSI_RESULT_INVALID_HANDLE, "libmsi_record_set_int returned wrong error\n");
r = libmsi_record_set_int(0,-1,0);
@@ -151,7 +151,7 @@ static void test_msirecord(void)
r = libmsi_record_set_string(h,0,str);
ok(r == LIBMSI_RESULT_SUCCESS, "Failed to set string at 0\n");
r = libmsi_record_get_integer(h, 0);
- ok(r == MSI_NULL_INTEGER, "should get invalid integer\n");
+ ok(r == LIBMSI_NULL_INT, "should get invalid integer\n");
r = libmsi_record_get_field_size(h,0);
ok(r==sizeof str-1, "size of string record is strlen\n");
buf[0]=0;
@@ -210,19 +210,19 @@ static void test_msirecord(void)
i = libmsi_record_set_string(h,0," 42");
ok(i == LIBMSI_RESULT_SUCCESS, "Failed to set string at 0\n");
i = libmsi_record_get_integer(h, 0);
- ok(i == MSI_NULL_INTEGER, "should get invalid integer\n");
+ ok(i == LIBMSI_NULL_INT, "should get invalid integer\n");
i = libmsi_record_set_string(h,0,"42 ");
ok(i == LIBMSI_RESULT_SUCCESS, "Failed to set string at 0\n");
i = libmsi_record_get_integer(h, 0);
- ok(i == MSI_NULL_INTEGER, "should get invalid integer\n");
+ ok(i == LIBMSI_NULL_INT, "should get invalid integer\n");
i = libmsi_record_set_string(h,0,"42.0");
ok(i == LIBMSI_RESULT_SUCCESS, "Failed to set string at 0\n");
i = libmsi_record_get_integer(h, 0);
- ok(i == MSI_NULL_INTEGER, "should get invalid integer\n");
+ ok(i == LIBMSI_NULL_INT, "should get invalid integer\n");
i = libmsi_record_set_string(h,0,"0x42");
ok(i == LIBMSI_RESULT_SUCCESS, "Failed to set string at 0\n");
i = libmsi_record_get_integer(h, 0);
- ok(i == MSI_NULL_INTEGER, "should get invalid integer\n");
+ ok(i == LIBMSI_NULL_INT, "should get invalid integer\n");
i = libmsi_record_set_string(h,0,"1000000000000000");
ok(i == LIBMSI_RESULT_SUCCESS, "Failed to set string at 0\n");
i = libmsi_record_get_integer(h, 0);
@@ -242,15 +242,15 @@ static void test_msirecord(void)
i = libmsi_record_set_string(h,0,"foo");
ok(i == LIBMSI_RESULT_SUCCESS, "Failed to set string at 0\n");
i = libmsi_record_get_integer(h, 0);
- ok(i == MSI_NULL_INTEGER, "should get zero\n");
+ ok(i == LIBMSI_NULL_INT, "should get zero\n");
i = libmsi_record_set_string(h,0,"");
ok(i == LIBMSI_RESULT_SUCCESS, "Failed to set string at 0\n");
i = libmsi_record_get_integer(h, 0);
- ok(i == MSI_NULL_INTEGER, "should get zero\n");
+ ok(i == LIBMSI_NULL_INT, "should get zero\n");
i = libmsi_record_set_string(h,0,"+1");
ok(i == LIBMSI_RESULT_SUCCESS, "Failed to set string at 0\n");
i = libmsi_record_get_integer(h, 0);
- ok(i == MSI_NULL_INTEGER, "should get zero\n");
+ ok(i == LIBMSI_NULL_INT, "should get zero\n");
/* same record, try converting integers to strings */
r = libmsi_record_set_int(h, 0, 32);
@@ -440,7 +440,7 @@ static void test_MsiRecordGetInteger(void)
ok(r == LIBMSI_RESULT_SUCCESS, "Expected LIBMSI_RESULT_SUCCESS, got %d\n", r);
val = libmsi_record_get_integer(rec, 1);
- ok(val == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", val);
+ ok(val == LIBMSI_NULL_INT, "Expected LIBMSI_NULL_INT, got %d\n", val);
g_object_unref(rec);
}
@@ -459,7 +459,7 @@ static void test_fieldzero(void)
ok(rec != 0, "Expected a valid handle\n");
r = libmsi_record_get_integer(rec, 0);
- ok(r == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", r);
+ ok(r == LIBMSI_NULL_INT, "Expected LIBMSI_NULL_INT, got %d\n", r);
sz = sizeof(buf);
strcpy(buf, "apple");
@@ -472,13 +472,13 @@ static void test_fieldzero(void)
ok(r == true, "Expected true, got %d\n", r);
r = libmsi_record_get_integer(rec, 1);
- ok(r == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", r);
+ ok(r == LIBMSI_NULL_INT, "Expected LIBMSI_NULL_INT, got %d\n", r);
r = libmsi_record_set_int(rec, 1, 42);
ok(r == LIBMSI_RESULT_SUCCESS, "Expected LIBMSI_RESULT_SUCCESS, got %d\n", r);
r = libmsi_record_get_integer(rec, 0);
- ok(r == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", r);
+ ok(r == LIBMSI_NULL_INT, "Expected LIBMSI_NULL_INT, got %d\n", r);
sz = sizeof(buf);
strcpy(buf, "apple");
@@ -497,7 +497,7 @@ static void test_fieldzero(void)
ok(r == LIBMSI_RESULT_SUCCESS, "Expected LIBMSI_RESULT_SUCCESS, got %d\n", r);
r = libmsi_record_get_integer(rec, 0);
- ok(r == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", r);
+ ok(r == LIBMSI_NULL_INT, "Expected LIBMSI_NULL_INT, got %d\n", r);
sz = sizeof(buf);
strcpy(buf, "apple");
@@ -547,7 +547,7 @@ static void test_fieldzero(void)
ok(r == LIBMSI_RESULT_SUCCESS, "Expected LIBMSI_RESULT_SUCCESS, got %d\n", r);
r = libmsi_record_get_integer(rec, 0);
- ok(r == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", r);
+ ok(r == LIBMSI_NULL_INT, "Expected LIBMSI_NULL_INT, got %d\n", r);
sz = sizeof(buf);
strcpy(buf, "apple");
@@ -573,7 +573,7 @@ static void test_fieldzero(void)
ok(r == LIBMSI_RESULT_SUCCESS, "Expected LIBMSI_RESULT_SUCCESS, got %d\n", r);
r = libmsi_record_get_integer(rec, 0);
- ok(r == MSI_NULL_INTEGER, "Expected NULL value, got %d\n", r);
+ ok(r == LIBMSI_NULL_INT, "Expected NULL value, got %d\n", r);
r = libmsi_record_is_null(rec, 0);
ok(r == true, "Expected true, got %d\n", r);