summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2023-03-21 20:12:59 +0100
committerCarlos Garnacho <carlosg@gnome.org>2023-03-21 21:03:43 +0100
commitd06090c19ad982467142df858c91ffd0bacfca29 (patch)
tree819d99976c6b6adec90040014cfdbf35971cab7f /tests
parent00e9909ada1a79ac775a99f1c089854f0cf7c074 (diff)
downloadtracker-d06090c19ad982467142df858c91ffd0bacfca29.tar.gz
tests: Pass right type/width to varargs TrackerBatch API
We specify G_TYPE_INT64 but pass an unspecified integer that gets promoted to 32-bit. This wreaks havoc in the GValue varargs collection glib code. Specify the right type in our tests, so that we don't hit this bug. Closes: https://gitlab.gnome.org/GNOME/tracker/-/issues/397
Diffstat (limited to 'tests')
-rw-r--r--tests/libtracker-sparql/tracker-batch-test.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/libtracker-sparql/tracker-batch-test.c b/tests/libtracker-sparql/tracker-batch-test.c
index 9b9f81b8c..a49eeed8c 100644
--- a/tests/libtracker-sparql/tracker-batch-test.c
+++ b/tests/libtracker-sparql/tracker-batch-test.c
@@ -525,7 +525,7 @@ batch_statement_insert (TestFixture *test_fixture,
"codec", G_TYPE_STRING, "png",
"interlaced", G_TYPE_BOOLEAN, FALSE,
"exposure", G_TYPE_DOUBLE, 0.12345678901,
- "resolution", G_TYPE_INT64, 123,
+ "resolution", G_TYPE_INT64, (gint64) 123,
"created", G_TYPE_DATE_TIME, date,
NULL);
@@ -556,7 +556,7 @@ batch_statement_update (TestFixture *test_fixture,
"codec", G_TYPE_STRING, "jpeg",
"interlaced", G_TYPE_BOOLEAN, TRUE,
"exposure", G_TYPE_DOUBLE, 1.23456789012,
- "resolution", G_TYPE_INT64, 234,
+ "resolution", G_TYPE_INT64, (gint64) 234,
"created", G_TYPE_DATE_TIME, date,
NULL);
tracker_batch_execute (batch, NULL, &error);
@@ -571,7 +571,7 @@ batch_statement_update (TestFixture *test_fixture,
"codec", G_TYPE_STRING, "png",
"interlaced", G_TYPE_BOOLEAN, FALSE,
"exposure", G_TYPE_DOUBLE, 0.12345678901,
- "resolution", G_TYPE_INT64, 123,
+ "resolution", G_TYPE_INT64, (gint64) 123,
"created", G_TYPE_DATE_TIME, date,
NULL);
tracker_batch_execute (batch, NULL, &error);
@@ -601,7 +601,7 @@ batch_statement_update_same_batch (TestFixture *test_fixture,
"codec", G_TYPE_STRING, "jpeg",
"interlaced", G_TYPE_BOOLEAN, TRUE,
"exposure", G_TYPE_DOUBLE, 1.23456789012,
- "resolution", G_TYPE_INT64, 234,
+ "resolution", G_TYPE_INT64, (gint64) 234,
"created", G_TYPE_DATE_TIME, date,
NULL);
tracker_batch_add_statement (batch, stmt,
@@ -609,7 +609,7 @@ batch_statement_update_same_batch (TestFixture *test_fixture,
"codec", G_TYPE_STRING, "png",
"interlaced", G_TYPE_BOOLEAN, FALSE,
"exposure", G_TYPE_DOUBLE, 0.12345678901,
- "resolution", G_TYPE_INT64, 123,
+ "resolution", G_TYPE_INT64, (gint64) 123,
"created", G_TYPE_DATE_TIME, date,
NULL);
tracker_batch_execute (batch, NULL, &error);
@@ -641,7 +641,7 @@ batch_statement_delete (TestFixture *test_fixture,
"codec", G_TYPE_STRING, "png",
"interlaced", G_TYPE_BOOLEAN, FALSE,
"exposure", G_TYPE_DOUBLE, 0.12345678901,
- "resolution", G_TYPE_INT64, 123,
+ "resolution", G_TYPE_INT64, (gint64) 123,
"created", G_TYPE_DATE_TIME, date,
NULL);
tracker_batch_execute (batch, NULL, &error);
@@ -683,7 +683,7 @@ batch_statement_delete_same_batch (TestFixture *test_fixture,
"codec", G_TYPE_STRING, "png",
"interlaced", G_TYPE_BOOLEAN, FALSE,
"exposure", G_TYPE_DOUBLE, 0.12345678901,
- "resolution", G_TYPE_INT64, 123,
+ "resolution", G_TYPE_INT64, (gint64) 123,
"created", G_TYPE_DATE_TIME, date,
NULL);
tracker_batch_add_statement (batch, del_stmt,