aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-02-25 16:16:54 -0500
committerDavid Robillard <d@drobilla.net>2021-03-08 23:23:05 -0500
commitfc2e2b667d82f6114e339e542edd8e2ca708dc1b (patch)
treeb70f70fbb932e2f035c02a6ef0b7a1aeceeca36e /test
parentc4821c8e6bf1f81c6ea31e11ebc0fc1666e9337b (diff)
downloadserd-fc2e2b667d82f6114e339e542edd8e2ca708dc1b.tar.gz
serd-fc2e2b667d82f6114e339e542edd8e2ca708dc1b.tar.bz2
serd-fc2e2b667d82f6114e339e542edd8e2ca708dc1b.zip
WIP: Use exess for reading and writing numeric and binary literals
Diffstat (limited to 'test')
-rw-r--r--test/test_node.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test_node.c b/test/test_node.c
index 8a93f215..1a83e4cb 100644
--- a/test/test_node.c
+++ b/test/test_node.c
@@ -42,7 +42,7 @@ test_strtod(double dbl, double max_delta)
char buf[1024];
snprintf(buf, sizeof(buf), "%f", dbl);
- char* endptr = NULL;
+ const char* endptr = NULL;
const double out = serd_strtod(buf, &endptr);
const double diff = fabs(out - dbl);
@@ -87,13 +87,13 @@ test_double_to_node(void)
"0.01",
"2.05",
"-16.00001",
- "5.00000001",
- "0.0",
+ "5.000000005",
+ "0.0000000001",
NULL,
NULL};
for (size_t i = 0; i < sizeof(dbl_test_nums) / sizeof(double); ++i) {
- SerdNode* node = serd_new_decimal(dbl_test_nums[i], 8, NULL);
+ SerdNode* node = serd_new_decimal(dbl_test_nums[i], NULL);
const char* node_str = node ? serd_node_string(node) : NULL;
const bool pass = (node_str && dbl_test_strs[i])
? !strcmp(node_str, dbl_test_strs[i])
@@ -138,7 +138,7 @@ test_integer_to_node(void)
static void
test_blob_to_node(void)
{
- assert(!serd_new_blob(&SERD_URI_NULL, 0, false, NULL));
+ assert(!serd_new_blob(&SERD_URI_NULL, 0, NULL));
for (size_t size = 1; size < 256; ++size) {
uint8_t* const data = (uint8_t*)malloc(size);
@@ -147,7 +147,7 @@ test_blob_to_node(void)
}
size_t out_size = 0;
- SerdNode* blob = serd_new_blob(data, size, size % 5, NULL);
+ SerdNode* blob = serd_new_blob(data, size, NULL);
const char* blob_str = serd_node_string(blob);
uint8_t* out =
(uint8_t*)serd_base64_decode(blob_str, serd_node_length(blob), &out_size);