aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_node_syntax.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_node_syntax.c')
-rw-r--r--test/test_node_syntax.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/test_node_syntax.c b/test/test_node_syntax.c
index 47b67c9f..02787ebe 100644
--- a/test/test_node_syntax.c
+++ b/test/test_node_syntax.c
@@ -22,6 +22,7 @@
#include <assert.h>
#include <stdbool.h>
+#include <stdint.h>
#include <string.h>
static void
@@ -87,7 +88,7 @@ check(SerdWorld* const world,
static void
test_common(SerdWorld* const world, const SerdSyntax syntax)
{
- static const int data[] = {4, 2};
+ static const uint8_t data[] = {19u, 17u, 13u, 7u};
static const SerdStringView datatype =
SERD_STRING("http://example.org/Datatype");
@@ -140,11 +141,16 @@ test_common(SerdWorld* const world, const SerdSyntax syntax)
serd_nodes_value(nodes, serd_float(1.25f)),
"\"1.25E0\"^^<http://www.w3.org/2001/XMLSchema#float>"));
+ assert(check(world,
+ syntax,
+ serd_nodes_hex(nodes, data, sizeof(data)),
+ "\"13110D07\"^^<http://www.w3.org/2001/XMLSchema#hexBinary>"));
+
assert(
check(world,
syntax,
serd_nodes_base64(nodes, data, sizeof(data)),
- "\"BAAAAAIAAAA=\"^^<http://www.w3.org/2001/XMLSchema#base64Binary>"));
+ "\"ExENBw==\"^^<http://www.w3.org/2001/XMLSchema#base64Binary>"));
serd_nodes_free(nodes);
}