summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-04-11 23:43:57 +0000
committerDavid Robillard <d@drobilla.net>2012-04-11 23:43:57 +0000
commitb716b49fd9e6943f8f6555931bb5997423de3fe5 (patch)
tree2117c11eb5dc372aaf9d624ebbc61370879f0720 /tests
parentd69e1fb5c865b09d134eb671a626165a019908d9 (diff)
downloadsratom-b716b49fd9e6943f8f6555931bb5997423de3fe5.tar.gz
sratom-b716b49fd9e6943f8f6555931bb5997423de3fe5.tar.bz2
sratom-b716b49fd9e6943f8f6555931bb5997423de3fe5.zip
Save/restore atom:Chunk as base64Binary literals (not blank nodes).
git-svn-id: http://svn.drobilla.net/lad/trunk/sratom@4167 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'tests')
-rw-r--r--tests/sratom_test.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/sratom_test.c b/tests/sratom_test.c
index e8745fa..f992153 100644
--- a/tests/sratom_test.c
+++ b/tests/sratom_test.c
@@ -97,11 +97,12 @@ main()
LV2_URID eg_langlit = urid_map(NULL, "http://example.org/j-langlit");
LV2_URID eg_typelit = urid_map(NULL, "http://example.org/k-typelit");
LV2_URID eg_null = urid_map(NULL, "http://example.org/l-null");
- 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_chunk = urid_map(NULL, "http://example.org/m-chunk");
+ LV2_URID eg_blob = urid_map(NULL, "http://example.org/n-blob");
+ LV2_URID eg_blank = urid_map(NULL, "http://example.org/o-blank");
+ LV2_URID eg_tuple = urid_map(NULL, "http://example.org/p-tuple");
+ LV2_URID eg_vector = urid_map(NULL, "http://example.org/q-vector");
+ LV2_URID eg_seq = urid_map(NULL, "http://example.org/r-seq");
uint8_t buf[1024];
lv2_atom_forge_set_buffer(&forge, buf, sizeof(buf));
@@ -165,6 +166,12 @@ main()
lv2_atom_forge_property_head(&forge, eg_null, 0);
lv2_atom_forge_atom(&forge, 0, 0);
+ // eg_chunk = 0xBEEFDEAD
+ uint8_t chunk_buf[] = { 0xBE, 0xEF, 0xDE, 0xAD };
+ lv2_atom_forge_property_head(&forge, eg_chunk, 0);
+ lv2_atom_forge_atom(&forge, sizeof(chunk_buf), forge.Chunk);
+ lv2_atom_forge_write(&forge, chunk_buf, sizeof(chunk_buf));
+
// eg_blob = 0xDEADBEEF
uint32_t blob_type = map.map(map.handle, "http://example.org/Blob");
uint8_t blob_buf[] = { 0xDE, 0xAD, 0xBE, 0xEF };