summaryrefslogtreecommitdiffstats
path: root/tests/sratom_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-07 00:08:26 +0000
committerDavid Robillard <d@drobilla.net>2012-03-07 00:08:26 +0000
commit2bdd503519c445c5617804376144cb0bdebf9629 (patch)
treed257a0c5d0c27127212d76828d44b054a128b01b /tests/sratom_test.c
parenta91b37a822fe366be5a582953857cb29dead8a36 (diff)
downloadsratom-2bdd503519c445c5617804376144cb0bdebf9629.tar.gz
sratom-2bdd503519c445c5617804376144cb0bdebf9629.tar.bz2
sratom-2bdd503519c445c5617804376144cb0bdebf9629.zip
Serialise the null atom as rdf:nil, i.e. "()" in Turtle.
git-svn-id: http://svn.drobilla.net/lad/trunk/sratom@4027 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'tests/sratom_test.c')
-rw-r--r--tests/sratom_test.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/sratom_test.c b/tests/sratom_test.c
index db7be64..4789ce2 100644
--- a/tests/sratom_test.c
+++ b/tests/sratom_test.c
@@ -97,11 +97,12 @@ main()
LV2_URID eg_string = urid_map(NULL, "http://example.org/j-string");
LV2_URID eg_langlit = urid_map(NULL, "http://example.org/k-langlit");
LV2_URID eg_typelit = urid_map(NULL, "http://example.org/l-typelit");
- LV2_URID eg_blob = urid_map(NULL, "http://example.org/m-blob");
- LV2_URID eg_blank = urid_map(NULL, "http://example.org/n-blank");
- LV2_URID eg_tuple = urid_map(NULL, "http://example.org/o-tuple");
- LV2_URID eg_vector = urid_map(NULL, "http://example.org/p-vector");
- LV2_URID eg_seq = urid_map(NULL, "http://example.org/q-seq");
+ LV2_URID eg_null = urid_map(NULL, "http://example.org/m-null");
+ LV2_URID eg_blob = urid_map(NULL, "http://example.org/o-blob");
+ LV2_URID eg_blank = urid_map(NULL, "http://example.org/p-blank");
+ LV2_URID eg_tuple = urid_map(NULL, "http://example.org/q-tuple");
+ LV2_URID eg_vector = urid_map(NULL, "http://example.org/r-vector");
+ LV2_URID eg_seq = urid_map(NULL, "http://example.org/s-seq");
uint8_t buf[1024];
lv2_atom_forge_set_buffer(&forge, buf, sizeof(buf));
@@ -167,6 +168,10 @@ main()
&forge, (const uint8_t*)"value", strlen("value"),
urid_map(NULL, "http://example.org/Type"), 0);
+ // eg_null = null
+ lv2_atom_forge_property_head(&forge, eg_null, 0);
+ lv2_atom_forge_atom(&forge, 0, 0);
+
// eg_blob = 0xDEADBEEF
uint32_t blob_type = map.map(map.handle, "http://example.org/Blob");
uint8_t blob_buf[] = { 0xDE, 0xAD, 0xBE, 0xEF };