[epiphany/mcatanzaro/sqlite-tests] ephy-sqlite-test: Remove more usage of g_assert()
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/sqlite-tests] ephy-sqlite-test: Remove more usage of g_assert()
- Date: Fri, 22 Mar 2019 14:16:24 +0000 (UTC)
commit 6dc91047975d812fb337c56ce1c360e09e5a2cbe
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Fri Mar 22 09:14:01 2019 -0500
ephy-sqlite-test: Remove more usage of g_assert()
Apparently I missed some bits here when purging g_assert() from our
testsuite earlier.
tests/ephy-sqlite-test.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/tests/ephy-sqlite-test.c b/tests/ephy-sqlite-test.c
index 3691f5b00..c80849cb1 100644
--- a/tests/ephy-sqlite-test.c
+++ b/tests/ephy-sqlite-test.c
@@ -163,24 +163,24 @@ test_bind_data (void)
ephy_sqlite_connection_execute (connection, "CREATE TABLE test (id INTEGER, text LONGVARCHAR)", &error);
statement = ephy_sqlite_connection_create_statement (connection, "INSERT INTO test (id, text) VALUES (?,
?)", &error);
- g_assert (statement);
- g_assert (!error);
+ g_assert_nonnull (statement);
+ g_assert_no_error (error);
- g_assert (ephy_sqlite_statement_bind_int (statement, 0, 3, &error));
- g_assert (!error);
- g_assert (ephy_sqlite_statement_bind_string (statement, 1, "foo", &error));
- g_assert (!error);
+ g_assert_true (ephy_sqlite_statement_bind_int (statement, 0, 3, &error));
+ g_assert_no_error (error);
+ g_assert_true (ephy_sqlite_statement_bind_string (statement, 1, "foo", &error));
+ g_assert_no_error (error);
/* Will return false since there are no resulting rows. */
- g_assert (!ephy_sqlite_statement_step (statement, &error));
- g_assert (!error);
+ g_assert_false (ephy_sqlite_statement_step (statement, &error));
+ g_assert_no_error (error);
g_object_unref (statement);
statement = ephy_sqlite_connection_create_statement (connection, "SELECT * FROM test", &error);
- g_assert (statement);
- g_assert (!error);
- g_assert (ephy_sqlite_statement_step (statement, &error));
- g_assert (!error);
+ g_assert_nonnull (statement);
+ g_assert_no_error (error);
+ g_assert_true (ephy_sqlite_statement_step (statement, &error));
+ g_assert_no_error (error);
g_assert_cmpint (ephy_sqlite_statement_get_column_count (statement), ==, 2);
g_assert_cmpint (ephy_sqlite_statement_get_column_as_int (statement, 0), ==, 3);
g_assert_cmpstr (ephy_sqlite_statement_get_column_as_string (statement, 1), ==, "foo");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]