aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Chan <benchan@chromium.org>2017-01-11 22:29:08 -0800
committerAleksander Morgado <aleksander@aleksander.es>2017-01-12 11:37:08 +0100
commit4a80c2416962626750696cb744da3a51e7b8f831 (patch)
tree8f102ec9a5c75ce17e1e57b4b90282a57fa37fbe
parent11297bcc7914f49ae79b450e6582f0cc61fd178f (diff)
telit: use g_assert instead of g_assert_true / g_assert_false
`g_assert_true' and `g_assert_false' are defined in glib 2.38 or later. The minimum glib version currently required by ModemMamanger is 2.36. While `g_assert_true' and `g_assert_false' may be preferred over the more generic `g_assert', it seems like overkill to bump the minimum glib version requirement just for that. When more code in ModemManager later requires newer versions of glib, we can migrate all existing code to use `g_assert_true' and `g_assert_false' when appropriate.
-rw-r--r--plugins/telit/tests/test-mm-modem-helpers-telit.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/telit/tests/test-mm-modem-helpers-telit.c b/plugins/telit/tests/test-mm-modem-helpers-telit.c
index 2da60c11..88a889e6 100644
--- a/plugins/telit/tests/test-mm-modem-helpers-telit.c
+++ b/plugins/telit/tests/test-mm-modem-helpers-telit.c
@@ -101,9 +101,9 @@ test_mm_bands_contains (void) {
for (i = 0; i < 3; i++)
g_array_append_val (mm_bands, i);
- g_assert_true (mm_telit_bands_contains (mm_bands, 2));
- g_assert_true (mm_telit_bands_contains (mm_bands, 2));
- g_assert_false (mm_telit_bands_contains (mm_bands, 3));
+ g_assert (mm_telit_bands_contains (mm_bands, 2));
+ g_assert (mm_telit_bands_contains (mm_bands, 2));
+ g_assert (!mm_telit_bands_contains (mm_bands, 3));
g_array_free (mm_bands, TRUE);
}
@@ -134,7 +134,7 @@ test_parse_band_flag_str (void) {
&band_flags,
&error);
g_assert_no_error (error);
- g_assert_true (res);
+ g_assert (res);
for (j = 0; j < band_flag_test[i].band_flags_len; j++) {
guint ref;
@@ -143,7 +143,7 @@ test_parse_band_flag_str (void) {
ref = band_flag_test[i].band_flags[j];
cur = g_array_index (band_flags, guint, j);
- g_assert_true (ref == cur);
+ g_assert (ref == cur);
}
g_array_free (band_flags, TRUE);
@@ -225,7 +225,7 @@ test_parse_supported_bands_response (void) {
&bands,
&error);
g_assert_no_error (error);
- g_assert_true (res);
+ g_assert (res);
for (j = 0; j < supported_band_mapping_tests[i].mm_bands_len; j++) {
@@ -302,7 +302,7 @@ test_parse_current_bands_response (void) {
&bands,
&error);
g_assert_no_error (error);
- g_assert_true (res);
+ g_assert (res);
for (j = 0; j < current_band_mapping_tests[i].mm_bands_len; j++) {