summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-self-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'libappstream-glib/as-self-test.c')
-rw-r--r--libappstream-glib/as-self-test.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/libappstream-glib/as-self-test.c b/libappstream-glib/as-self-test.c
index eafb15e..efcaa1f 100644
--- a/libappstream-glib/as-self-test.c
+++ b/libappstream-glib/as-self-test.c
@@ -533,7 +533,7 @@ as_test_release_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.4);
+ as_node_context_set_version (ctx, "0.4");
n = as_release_node_insert (release, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_NONE);
ret = as_test_compare_lines (xml->str, src, &error);
@@ -604,7 +604,7 @@ as_test_provide_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.4);
+ as_node_context_set_version (ctx, "0.4");
n = as_provide_node_insert (provide, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_NONE);
ret = as_test_compare_lines (xml->str, src, &error);
@@ -646,7 +646,7 @@ as_test_launchable_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.4);
+ as_node_context_set_version (ctx, "0.4");
n = as_launchable_node_insert (launchable, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_NONE);
ret = as_test_compare_lines (xml->str, src, &error);
@@ -737,7 +737,7 @@ as_test_release_appstream_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 1.0);
+ as_node_context_set_version (ctx, "1.0");
as_node_context_set_format_kind (ctx, AS_FORMAT_KIND_APPSTREAM);
n = as_release_node_insert (release, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_FORMAT_MULTILINE);
@@ -1021,7 +1021,7 @@ as_test_icon_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.4);
+ as_node_context_set_version (ctx, "0.4");
n = as_icon_node_insert (icon, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_NONE);
ret = as_test_compare_lines (xml->str, "<icon type=\"cached\" height=\"64\" width=\"64\">app.png</icon>", &error);
@@ -1084,7 +1084,7 @@ as_test_icon_scale_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.9);
+ as_node_context_set_version (ctx, "0.9");
n = as_icon_node_insert (icon, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_NONE);
ret = as_test_compare_lines (xml->str, src, &error);
@@ -1136,7 +1136,7 @@ as_test_checksum_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.4);
+ as_node_context_set_version (ctx, "0.4");
n = as_checksum_node_insert (csum, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_NONE);
ret = as_test_compare_lines (xml->str, src, &error);
@@ -1230,7 +1230,7 @@ as_test_icon_embedded_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.4);
+ as_node_context_set_version (ctx, "0.4");
n = as_icon_node_insert (icon, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_NONE);
ret = as_test_compare_lines (xml->str, src, &error);
@@ -1291,7 +1291,7 @@ as_test_image_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.4);
+ as_node_context_set_version (ctx, "0.4");
n = as_image_node_insert (image, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_NONE);
ret = as_test_compare_lines (xml->str, src, &error);
@@ -1369,7 +1369,7 @@ as_test_agreement_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.4);
+ as_node_context_set_version (ctx, "0.4");
n = as_agreement_node_insert (agreement, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_FORMAT_MULTILINE);
ret = as_test_compare_lines (xml->str, src, &error);
@@ -1431,7 +1431,7 @@ as_test_review_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.4);
+ as_node_context_set_version (ctx, "0.4");
n = as_review_node_insert (review, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_FORMAT_MULTILINE);
ret = as_test_compare_lines (xml->str, src, &error);
@@ -1497,7 +1497,7 @@ as_test_require_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.4);
+ as_node_context_set_version (ctx, "0.4");
n = as_app_node_insert (app, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_FORMAT_MULTILINE);
ret = as_test_compare_lines (xml->str, src, &error);
@@ -1577,7 +1577,7 @@ as_test_suggest_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.4);
+ as_node_context_set_version (ctx, "0.4");
n = as_suggest_node_insert (suggest, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_FORMAT_MULTILINE);
ret = as_test_compare_lines (xml->str, src, &error);
@@ -1622,7 +1622,7 @@ as_test_bundle_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.4);
+ as_node_context_set_version (ctx, "0.4");
n = as_bundle_node_insert (bundle, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_NONE);
ret = as_test_compare_lines (xml->str, src, &error);
@@ -1665,7 +1665,7 @@ as_test_translation_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.4);
+ as_node_context_set_version (ctx, "0.4");
n = as_translation_node_insert (translation, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_NONE);
ret = as_test_compare_lines (xml->str, src, &error);
@@ -1728,7 +1728,7 @@ as_test_screenshot_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.8);
+ as_node_context_set_version (ctx, "0.8");
n = as_screenshot_node_insert (screenshot, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_FORMAT_MULTILINE);
ret = as_test_compare_lines (xml->str, src, &error);
@@ -1794,7 +1794,7 @@ as_test_content_rating_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.8);
+ as_node_context_set_version (ctx, "0.8");
n = as_content_rating_node_insert (content_rating, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_FORMAT_MULTILINE);
ret = as_test_compare_lines (xml->str, src, &error);
@@ -2120,7 +2120,7 @@ as_test_app_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 1.0);
+ as_node_context_set_version (ctx, "1.0");
n = as_app_node_insert (app, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_FORMAT_MULTILINE);
ret = as_test_compare_lines (xml->str, src, &error);
@@ -2750,7 +2750,7 @@ as_test_app_no_markup_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.4);
+ as_node_context_set_version (ctx, "0.4");
n = as_app_node_insert (app, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_FORMAT_MULTILINE);
ret = as_test_compare_lines (xml->str, src, &error);
@@ -3767,7 +3767,7 @@ as_test_store_demote_func (void)
/* add apps */
store = as_store_new ();
- as_store_set_api_version (store, 0.8);
+ as_store_set_version (store, "0.8");
as_store_add_app (store, app_desktop);
as_store_add_app (store, app_appdata);
@@ -3950,7 +3950,7 @@ as_test_store_func (void)
g_assert_cmpstr (as_store_get_origin (store), ==, NULL);
/* check string output */
- as_store_set_api_version (store, 0.6);
+ as_store_set_version (store, "0.6");
xml = as_store_to_xml (store, 0);
ret = as_test_compare_lines (xml->str,
"<components version=\"0.6\">"
@@ -3972,7 +3972,7 @@ as_test_store_func (void)
as_store_remove_app (store, app);
/* check string output */
- as_store_set_api_version (store, 0.6);
+ as_store_set_version (store, "0.6");
xml = as_store_to_xml (store, 0);
ret = as_test_compare_lines (xml->str,
"<components version=\"0.6\">"
@@ -4159,7 +4159,7 @@ as_test_store_versions_func (void)
g_assert (as_app_get_format_by_kind (app, AS_FORMAT_KIND_APPSTREAM) != NULL);
/* test with latest features */
- as_store_set_api_version (store, 0.6);
+ as_store_set_version (store, "0.6");
g_assert_cmpfloat (as_store_get_api_version (store), <, 0.6 + 0.01);
g_assert_cmpfloat (as_store_get_api_version (store), >, 0.6 - 0.01);
xml = as_store_to_xml (store, AS_NODE_TO_XML_FLAG_FORMAT_MULTILINE);
@@ -4323,7 +4323,7 @@ as_test_node_no_dup_c_func (void)
/* back to node */
root = as_node_new ();
- as_node_context_set_version (ctx, 0.4);
+ as_node_context_set_version (ctx, "0.4");
n = as_app_node_insert (app, root, ctx);
xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_NONE);
g_assert_cmpstr (xml->str, ==,