aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-01-07 18:55:35 +0100
committerDavid Robillard <d@drobilla.net>2019-01-07 18:55:35 +0100
commit9d31b07bbc144da93eb65250ee7cf47611d1ce16 (patch)
tree83c59c63f86281803ff9e11a033b251e950fbe58 /tests
parent9b80535334de1a3ca0bf40d2f1109202385148aa (diff)
downloadserd-9d31b07bbc144da93eb65250ee7cf47611d1ce16.tar.gz
serd-9d31b07bbc144da93eb65250ee7cf47611d1ce16.tar.bz2
serd-9d31b07bbc144da93eb65250ee7cf47611d1ce16.zip
WIP: Fix warningsserd1-warnings
Diffstat (limited to 'tests')
-rw-r--r--tests/serd_test.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c
index c009090e..dba92ee9 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -159,13 +159,27 @@ main(void)
// Test serd_new_decimal
- const double dbl_test_nums[] = {
- 0.0, 9.0, 10.0, .01, 2.05, -16.00001, 5.000000005, 0.0000000001, NAN, INFINITY
- };
-
- const char* dbl_test_strs[] = {
- "0.0", "9.0", "10.0", "0.01", "2.05", "-16.00001", "5.00000001", "0.0", NULL, NULL
- };
+ const double dbl_test_nums[] = {0.0,
+ 9.0,
+ 10.0,
+ .01,
+ 2.05,
+ -16.00001,
+ 5.000000005,
+ 0.0000000001,
+ (double)NAN,
+ (double)INFINITY};
+
+ const char* dbl_test_strs[] = {"0.0",
+ "9.0",
+ "10.0",
+ "0.01",
+ "2.05",
+ "-16.00001",
+ "5.00000001",
+ "0.0",
+ NULL,
+ NULL};
for (unsigned i = 0; i < sizeof(dbl_test_nums) / sizeof(double); ++i) {
SerdNode* node = serd_new_decimal(dbl_test_nums[i], 8, NULL);