summaryrefslogtreecommitdiffstats
path: root/tests
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
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')
-rw-r--r--tests/testdatabase.c18
-rw-r--r--tests/testrecord.c32
2 files changed, 25 insertions, 25 deletions
diff --git a/tests/testdatabase.c b/tests/testdatabase.c
index 38d1267..244d9d1 100644
--- a/tests/testdatabase.c
+++ b/tests/testdatabase.c
@@ -1933,7 +1933,7 @@ static void test_msiimport(void)
ok(i == 2, "Expected 2, got %d\n", i);
i = libmsi_record_get_integer(rec, 4);
- ok(i == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", i);
+ ok(i == LIBMSI_NULL_INT, "Expected LIBMSI_NULL_INT, got %d\n", i);
i = libmsi_record_get_integer(rec, 5);
ok(i == 2147483640, "Expected 2147483640, got %d\n", i);
@@ -3821,9 +3821,9 @@ static void test_integers(void)
ok(r == 8, "record count wrong: %d\n", r);
i = libmsi_record_get_integer(rec, 1);
- ok(i == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", i);
+ ok(i == LIBMSI_NULL_INT, "Expected LIBMSI_NULL_INT, got %d\n", i);
i = libmsi_record_get_integer(rec, 3);
- ok(i == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", i);
+ ok(i == LIBMSI_NULL_INT, "Expected LIBMSI_NULL_INT, got %d\n", i);
i = libmsi_record_get_integer(rec, 2);
ok(i == 2, "Expected 2, got %d\n", i);
i = libmsi_record_get_integer(rec, 4);
@@ -6635,7 +6635,7 @@ static void test_dbmerge(void)
ok(r == 2, "Expected 2, got %d\n", r);
r = libmsi_record_get_integer(hrec, 3);
- 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);
g_object_unref(hrec);
@@ -6680,7 +6680,7 @@ static void test_dbmerge(void)
ok(r == 2, "Expected 2, got %d\n", r);
r = libmsi_record_get_integer(hrec, 3);
- 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);
g_object_unref(hrec);
@@ -7124,12 +7124,12 @@ static void test_select_with_tablenames(void)
static const unsigned ordervals[6][3] =
{
- { MSI_NULL_INTEGER, 12, 13 },
+ { LIBMSI_NULL_INT, 12, 13 },
{ 1, 2, 3 },
{ 6, 4, 5 },
{ 8, 9, 7 },
- { 10, 11, MSI_NULL_INTEGER },
- { 14, MSI_NULL_INTEGER, 15 }
+ { 10, 11, LIBMSI_NULL_INT },
+ { 14, LIBMSI_NULL_INT, 15 }
};
static void test_insertorder(void)
@@ -7169,7 +7169,7 @@ static void test_insertorder(void)
ok(r == LIBMSI_RESULT_SUCCESS, "Expected LIBMSI_RESULT_SUCCESS, got %d\n", r);
/* fails because the primary key already
- * has an MSI_NULL_INTEGER value set above
+ * has an LIBMSI_NULL_INT value set above
*/
sql = "INSERT INTO `T` ( `C` ) VALUES ( 14 )";
r = run_query(hdb, 0, sql);
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);