aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>2021-07-10 06:49:19 +0200
committerKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>2021-07-19 12:53:25 +0200
commitfee2d27b9fb3ad0e255b66ece50047f7219af3a7 (patch)
tree5fc476a7100d6a6e927f70fa682f0369c370b688
parent21101e5b045862e8fd8beb2e64c6efcc1786d918 (diff)
downloadneard-fee2d27b9fb3ad0e255b66ece50047f7219af3a7.tar.gz
unit: use g_assert_null()
It's more readable. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
-rw-r--r--unit/test-ndef-build.c2
-rw-r--r--unit/test-ndef-parse.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/unit/test-ndef-build.c b/unit/test-ndef-build.c
index e83f7a8..bf77fdd 100644
--- a/unit/test-ndef-build.c
+++ b/unit/test-ndef-build.c
@@ -95,7 +95,7 @@ static void test_ndef_wsc_with_out_ssid_build(void)
ndef = near_ndef_prepare_wsc_record(NULL, NULL);
- g_assert(!ndef);
+ g_assert_null(ndef);
}
int main(int argc, char **argv)
diff --git a/unit/test-ndef-parse.c b/unit/test-ndef-parse.c
index 9d68a6a..a4f1ab3 100644
--- a/unit/test-ndef-parse.c
+++ b/unit/test-ndef-parse.c
@@ -290,8 +290,8 @@ static void test_ndef_single_sp(void)
g_assert(record->sp);
g_assert_cmpuint(record->sp->number_of_title_records, ==, 0);
- g_assert(!record->sp->type);
- g_assert(!record->sp->action);
+ g_assert_null(record->sp->type);
+ g_assert_null(record->sp->action);
g_assert_cmpuint(record->sp->size, ==, 0);
g_assert(record->sp->uri);
@@ -332,8 +332,8 @@ static void test_ndef_title_sp(void)
g_assert(record->sp);
g_assert_cmpuint(record->sp->number_of_title_records, ==, 1);
- g_assert(!record->sp->type);
- g_assert(!record->sp->action);
+ g_assert_null(record->sp->type);
+ g_assert_null(record->sp->action);
g_assert_cmpuint(record->sp->size, ==, 0);
g_assert(record->sp->uri);
g_assert(record->sp->title_records[0]);