summaryrefslogtreecommitdiff
path: root/unit/test-sms-root.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2018-12-20 15:54:40 -0600
committerDenis Kenzior <denkenz@gmail.com>2018-12-27 18:18:51 -0600
commit71544d7fe1a293f829ace3aea327311e0eb17c8a (patch)
tree6e8a207b89597ace2bbcea0b1ff1418cc2134662 /unit/test-sms-root.c
parent538804e1918accd2f6b286db5cc0e1de40cb83f2 (diff)
downloadofono-71544d7fe1a293f829ace3aea327311e0eb17c8a.tar.gz
unit: convert usage of g_test_verbose
Convert all usages of this function in favor of using a static VERBOSE variable. We almost never use verbose output except while debugging. Additionally this allows us to more easily convert all unit tests to the ell unit test framework
Diffstat (limited to 'unit/test-sms-root.c')
-rw-r--r--unit/test-sms-root.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/unit/test-sms-root.c b/unit/test-sms-root.c
index 1aede080..7a7017ab 100644
--- a/unit/test-sms-root.c
+++ b/unit/test-sms-root.c
@@ -29,11 +29,12 @@
#include <string.h>
#include <glib.h>
-#include <glib/gprintf.h>
#include "util.h"
#include "smsutil.h"
+static const bool VERBOSE = false;
+
static const char *assembly_pdu1 = "038121F340048155550119906041001222048C0500"
"031E0301041804420430043A002C002004100"
"43B0435043A04410430043D04340440002000"
@@ -81,10 +82,10 @@ static void test_serialize_assembly(void)
l = sms_assembly_add_fragment(assembly, &sms, time(NULL),
&sms.deliver.oaddr, ref, max, seq);
- if (g_test_verbose()) {
- g_print("Ref: %u\n", ref);
- g_print("Max: %u\n", max);
- g_print("From: %s\n",
+ if (VERBOSE) {
+ printf("Ref: %u\n", ref);
+ printf("Max: %u\n", max);
+ printf("From: %s\n",
sms_address_to_string(&sms.deliver.oaddr));
}