[evolution] Use `g_assert_true()` instead of `g_assert()` in the unit tests



commit 33c72a80c5ddb997e01a281680c7e0cb216e196e
Author: Milan Crha <mcrha redhat com>
Date:   Wed Sep 29 13:06:12 2021 +0200

    Use `g_assert_true()` instead of `g_assert()` in the unit tests
    
    The `g_assert()` can be disabled by `G_DISABLE_ASSERT` when compiling,
    which is not desired for the unit tests, thus use the `g_assert_true()`
    in the tests instead.

 src/e-util/test-html-editor-units-utils.c |   8 +-
 src/e-util/test-html-editor-units.c       |   6 +-
 src/e-util/test-web-view-jsc.c            | 250 +++++++++++++++---------------
 3 files changed, 132 insertions(+), 132 deletions(-)
---
diff --git a/src/e-util/test-html-editor-units-utils.c b/src/e-util/test-html-editor-units-utils.c
index a286b20db9..abbeef8130 100644
--- a/src/e-util/test-html-editor-units-utils.c
+++ b/src/e-util/test-html-editor-units-utils.c
@@ -97,7 +97,7 @@ get_editor_content_hash_ready_cb (GObject *source_object,
        GError *error = NULL;
 
        g_assert_nonnull (gcd);
-       g_assert (E_IS_CONTENT_EDITOR (source_object));
+       g_assert_true (E_IS_CONTENT_EDITOR (source_object));
 
        gcd->content_hash = e_content_editor_get_content_finish (E_CONTENT_EDITOR (source_object), result, 
&error);
 
@@ -114,14 +114,14 @@ test_utils_get_editor_content_hash_sync (EContentEditor *cnt_editor,
 {
        GetContentData gcd;
 
-       g_assert (E_IS_CONTENT_EDITOR (cnt_editor));
+       g_assert_true (E_IS_CONTENT_EDITOR (cnt_editor));
 
        gcd.content_hash = NULL;
        gcd.async_data = test_utils_async_call_prepare ();
 
        e_content_editor_get_content (cnt_editor, flags, "test-domain", NULL, 
get_editor_content_hash_ready_cb, &gcd);
 
-       g_assert (test_utils_async_call_wait (gcd.async_data, MAX (event_processing_delay_ms / 25, 1) + 1));
+       g_assert_true (test_utils_async_call_wait (gcd.async_data, MAX (event_processing_delay_ms / 25, 1) + 
1));
        g_assert_nonnull (gcd.content_hash);
 
        return gcd.content_hash;
@@ -717,7 +717,7 @@ test_html_equal_done_cb (GObject *source_object,
 
        js_value = webkit_javascript_result_get_js_value (js_result);
        g_assert_nonnull (js_value);
-       g_assert (jsc_value_is_boolean (js_value));
+       g_assert_true (jsc_value_is_boolean (js_value));
 
        hed->equal = jsc_value_to_boolean (js_value);
 
diff --git a/src/e-util/test-html-editor-units.c b/src/e-util/test-html-editor-units.c
index f8d553e9a8..dd1f40343f 100644
--- a/src/e-util/test-html-editor-units.c
+++ b/src/e-util/test-html-editor-units.c
@@ -30,12 +30,12 @@
 static void
 test_create_editor (TestFixture *fixture)
 {
-       g_assert (fixture->editor != NULL);
+       g_assert_true (fixture->editor != NULL);
        g_assert_cmpstr (e_html_editor_get_content_editor_name (fixture->editor), ==, 
DEFAULT_CONTENT_EDITOR_NAME);
 
        /* test of the test function */
-       g_assert (test_utils_html_equal (fixture, "<span>a</span>", "<sPaN>a</spaN>"));
-       g_assert (!test_utils_html_equal (fixture, "<span>A</span>", "<sPaN>a</spaN>"));
+       g_assert_true (test_utils_html_equal (fixture, "<span>a</span>", "<sPaN>a</spaN>"));
+       g_assert_true (!test_utils_html_equal (fixture, "<span>A</span>", "<sPaN>a</spaN>"));
 }
 
 static void
diff --git a/src/e-util/test-web-view-jsc.c b/src/e-util/test-web-view-jsc.c
index 629d25dfb0..9f710be2f4 100644
--- a/src/e-util/test-web-view-jsc.c
+++ b/src/e-util/test-web-view-jsc.c
@@ -342,7 +342,7 @@ test_utils_jsc_call_bool_sync (TestFixture *fixture,
        test_utils_jsc_call_sync (fixture, script, &result);
 
        g_assert_nonnull (result);
-       g_assert (jsc_value_is_boolean (result));
+       g_assert_true (jsc_value_is_boolean (result));
 
        res = jsc_value_to_boolean (result);
 
@@ -361,7 +361,7 @@ test_utils_jsc_call_int32_sync (TestFixture *fixture,
        test_utils_jsc_call_sync (fixture, script, &result);
 
        g_assert_nonnull (result);
-       g_assert (jsc_value_is_number (result));
+       g_assert_true (jsc_value_is_number (result));
 
        res = jsc_value_to_int32 (result);
 
@@ -380,7 +380,7 @@ test_utils_jsc_call_string_sync (TestFixture *fixture,
        test_utils_jsc_call_sync (fixture, script, &result);
 
        g_assert_nonnull (result);
-       g_assert (jsc_value_is_null (result) || jsc_value_is_string (result));
+       g_assert_true (jsc_value_is_null (result) || jsc_value_is_string (result));
 
        if (jsc_value_is_null (result))
                res = NULL;
@@ -555,12 +555,12 @@ test_jsc_object_properties (TestFixture *fixture)
        g_free (str);
 
        g_assert_nonnull (jsc_object);
-       g_assert (jsc_value_is_object (jsc_object));
+       g_assert_true (jsc_value_is_object (jsc_object));
 
-       g_assert (e_web_view_jsc_get_object_property_boolean (jsc_object, "btrue", FALSE));
-       g_assert (!e_web_view_jsc_get_object_property_boolean (jsc_object, "bfalse", TRUE));
-       g_assert (!e_web_view_jsc_get_object_property_boolean (jsc_object, "budenfined", FALSE));
-       g_assert (e_web_view_jsc_get_object_property_boolean (jsc_object, "budenfined", TRUE));
+       g_assert_true (e_web_view_jsc_get_object_property_boolean (jsc_object, "btrue", FALSE));
+       g_assert_true (!e_web_view_jsc_get_object_property_boolean (jsc_object, "bfalse", TRUE));
+       g_assert_true (!e_web_view_jsc_get_object_property_boolean (jsc_object, "budenfined", FALSE));
+       g_assert_true (e_web_view_jsc_get_object_property_boolean (jsc_object, "budenfined", TRUE));
        g_assert_cmpint (e_web_view_jsc_get_object_property_int32 (jsc_object, "i2", 0), ==, 2);
        g_assert_cmpint (e_web_view_jsc_get_object_property_int32 (jsc_object, "i67890", 0), ==, 67890);
        g_assert_cmpint (e_web_view_jsc_get_object_property_int32 (jsc_object, "i-12345", 0), ==, -12345);
@@ -592,72 +592,72 @@ test_set_element_hidden (TestFixture *fixture)
 {
        test_utils_load_body (fixture, LOAD_ALL);
 
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", 
\"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn2\").hidden"));
 
        e_web_view_jsc_set_element_hidden (fixture->web_view, "", "btn1", TRUE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").hidden"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", 
\"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn2\").hidden"));
 
        e_web_view_jsc_set_element_hidden (fixture->web_view, "frm1_1", "btn1", TRUE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", \"btn1\").hidden"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").hidden"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", 
\"btn1\").hidden"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn2\").hidden"));
 
        e_web_view_jsc_set_element_hidden (fixture->web_view, "frm2", "btn2", TRUE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", \"btn1\").hidden"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn1\").hidden"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").hidden"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", 
\"btn1\").hidden"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn1\").hidden"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").hidden"));
 
        e_web_view_jsc_set_element_hidden (fixture->web_view, "", "btn1", FALSE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", \"btn1\").hidden"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn1\").hidden"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", 
\"btn1\").hidden"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn1\").hidden"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").hidden"));
 
        e_web_view_jsc_set_element_hidden (fixture->web_view, "frm2", "btn1", FALSE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", \"btn1\").hidden"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn1\").hidden"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", 
\"btn1\").hidden"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn1\").hidden"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").hidden"));
 
        e_web_view_jsc_set_element_hidden (fixture->web_view, "frm1_1", "btn1", FALSE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"btn1\").hidden"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn1\").hidden"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", 
\"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"btn1\").hidden"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn1\").hidden"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").hidden"));
 }
 
 static void
@@ -665,72 +665,72 @@ test_set_element_disabled (TestFixture *fixture)
 {
        test_utils_load_body (fixture, LOAD_ALL);
 
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", 
\"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn2\").disabled"));
 
        e_web_view_jsc_set_element_disabled (fixture->web_view, "", "btn1", TRUE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").disabled"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", 
\"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn2\").disabled"));
 
        e_web_view_jsc_set_element_disabled (fixture->web_view, "frm1_1", "btn1", TRUE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", \"btn1\").disabled"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").disabled"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", 
\"btn1\").disabled"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn2\").disabled"));
 
        e_web_view_jsc_set_element_disabled (fixture->web_view, "frm2", "btn2", TRUE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", \"btn1\").disabled"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn1\").disabled"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").disabled"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", 
\"btn1\").disabled"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn1\").disabled"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn2\").disabled"));
 
        e_web_view_jsc_set_element_disabled (fixture->web_view, "", "btn1", FALSE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", \"btn1\").disabled"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn1\").disabled"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", 
\"btn1\").disabled"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn1\").disabled"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn2\").disabled"));
 
        e_web_view_jsc_set_element_disabled (fixture->web_view, "frm2", "btn1", FALSE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", \"btn1\").disabled"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn1\").disabled"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", 
\"btn1\").disabled"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn1\").disabled"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn2\").disabled"));
 
        e_web_view_jsc_set_element_disabled (fixture->web_view, "frm1_1", "btn1", FALSE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"btn1\").disabled"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn1\").disabled"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"btn2\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"btn3\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1\", 
\"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"btn1\").disabled"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn1\").disabled"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"btn2\").disabled"));
 }
 
 static void
@@ -738,52 +738,52 @@ test_set_element_checked (TestFixture *fixture)
 {
        test_utils_load_body (fixture, LOAD_ALL);
 
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"chk1\").checked"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"chk1\").checked"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"chk2\").checked"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"chk1\").checked"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"chk1\").checked"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"chk2\").checked"));
 
        e_web_view_jsc_set_element_checked (fixture->web_view, "", "chk1", TRUE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"chk1\").checked"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"chk1\").checked"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"chk2\").checked"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"chk1\").checked"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"chk1\").checked"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"chk2\").checked"));
 
        e_web_view_jsc_set_element_checked (fixture->web_view, "frm1_1", "chk1", TRUE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"chk1\").checked"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"chk1\").checked"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"chk2\").checked"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"chk1\").checked"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"chk1\").checked"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"chk2\").checked"));
 
        e_web_view_jsc_set_element_checked (fixture->web_view, "", "chk1", FALSE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"chk1\").checked"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"chk1\").checked"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"chk2\").checked"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"chk1\").checked"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"chk1\").checked"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"chk2\").checked"));
 
        e_web_view_jsc_set_element_checked (fixture->web_view, "frm2", "chk2", FALSE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"chk1\").checked"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"chk1\").checked"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"chk2\").checked"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"chk1\").checked"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"chk1\").checked"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"chk2\").checked"));
 
        e_web_view_jsc_set_element_checked (fixture->web_view, "", "chk1", TRUE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"chk1\").checked"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"chk1\").checked"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"chk2\").checked"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"chk1\").checked"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"chk1\").checked"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"chk2\").checked"));
 
        e_web_view_jsc_set_element_checked (fixture->web_view, "frm1_1", "chk1", FALSE, NULL);
        e_web_view_jsc_set_element_checked (fixture->web_view, "frm2", "chk2", TRUE, NULL);
        test_utils_wait_noop (fixture);
 
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"chk1\").checked"));
-       g_assert (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", \"chk1\").checked"));
-       g_assert (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", \"chk2\").checked"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"\", \"chk1\").checked"));
+       g_assert_true (!test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm1_1\", 
\"chk1\").checked"));
+       g_assert_true (test_utils_jsc_call_bool_sync (fixture, "Evo.FindElement(\"frm2\", 
\"chk2\").checked"));
 }
 
 static void
@@ -1263,7 +1263,7 @@ test_need_input_changed (TestFixture *fixture)
 
        test_utils_load_body (fixture, LOAD_FRM1_1);
 
-       g_assert (!e_web_view_get_need_input (E_WEB_VIEW (fixture->web_view)));
+       g_assert_true (!e_web_view_get_need_input (E_WEB_VIEW (fixture->web_view)));
 
        nid.fixture = fixture;
        nid.expects = FALSE;
@@ -1292,7 +1292,7 @@ test_need_input_changed (TestFixture *fixture)
 
        g_signal_handler_disconnect (fixture->web_view, handler_id);
 
-       g_assert (!e_web_view_get_need_input (E_WEB_VIEW (fixture->web_view)));
+       g_assert_true (!e_web_view_get_need_input (E_WEB_VIEW (fixture->web_view)));
 }
 
 static void
@@ -1363,13 +1363,13 @@ test_selection_ready_cb (GObject *source_object,
        gboolean success;
        GError *error = NULL;
 
-       g_assert (WEBKIT_IS_WEB_VIEW (source_object));
+       g_assert_true (WEBKIT_IS_WEB_VIEW (source_object));
        g_assert_nonnull (gcd);
 
        success = e_web_view_jsc_get_selection_finish (WEBKIT_WEB_VIEW (source_object), result, &texts, 
&error);
 
        g_assert_no_error (error);
-       g_assert (success);
+       g_assert_true (success);
 
        test_verify_get_content_data (gcd, texts);
 
@@ -1491,13 +1491,13 @@ test_get_document_content_ready_cb (GObject *source_object,
        gboolean success;
        GError *error = NULL;
 
-       g_assert (WEBKIT_IS_WEB_VIEW (source_object));
+       g_assert_true (WEBKIT_IS_WEB_VIEW (source_object));
        g_assert_nonnull (gcd);
 
        success = e_web_view_jsc_get_document_content_finish (WEBKIT_WEB_VIEW (source_object), result, 
&texts, &error);
 
        g_assert_no_error (error);
-       g_assert (success);
+       g_assert_true (success);
 
        test_verify_get_content_data (gcd, texts);
 
@@ -1541,13 +1541,13 @@ test_get_element_content_ready_cb (GObject *source_object,
        gboolean success;
        GError *error = NULL;
 
-       g_assert (WEBKIT_IS_WEB_VIEW (source_object));
+       g_assert_true (WEBKIT_IS_WEB_VIEW (source_object));
        g_assert_nonnull (gcd);
 
        success = e_web_view_jsc_get_element_content_finish (WEBKIT_WEB_VIEW (source_object), result, &texts, 
&error);
 
        g_assert_no_error (error);
-       g_assert (success);
+       g_assert_true (success);
 
        test_verify_get_content_data (gcd, texts);
 
@@ -1724,13 +1724,13 @@ test_get_element_from_point_ready_cb (GObject *source_object,
        gboolean success;
        GError *error = NULL;
 
-       g_assert (WEBKIT_IS_WEB_VIEW (source_object));
+       g_assert_true (WEBKIT_IS_WEB_VIEW (source_object));
        g_assert_nonnull (gefp);
 
        success = e_web_view_jsc_get_element_from_point_finish (WEBKIT_WEB_VIEW (source_object), result, 
&iframe_src, &iframe_id, &element_id, &error);
 
        g_assert_no_error (error);
-       g_assert (success);
+       g_assert_true (success);
 
        g_assert_cmpstr (iframe_src, ==, gefp->expect_iframe_src);
        g_assert_cmpstr (iframe_id, ==, gefp->expect_iframe_id);
@@ -1842,7 +1842,7 @@ test_get_element_from_point (TestFixture *fixture)
                test_utils_jsc_call_sync (fixture, script, &value);
 
                g_assert_nonnull (value);
-               g_assert (jsc_value_is_object (value));
+               g_assert_true (jsc_value_is_object (value));
 
                xx = e_web_view_jsc_get_object_property_int32 (value, "left", -1);
                yy = e_web_view_jsc_get_object_property_int32 (value, "top", -1);
@@ -1909,7 +1909,7 @@ test_get_element_from_point (TestFixture *fixture)
                test_utils_jsc_call_sync (fixture, script, &value);
 
                g_assert_nonnull (value);
-               g_assert (jsc_value_is_object (value));
+               g_assert_true (jsc_value_is_object (value));
 
                xx = e_web_view_jsc_get_object_property_int32 (value, "right", -1);
                yy = e_web_view_jsc_get_object_property_int32 (value, "top", -1);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]