From 2d66c5e98f1bbc8244d61e6f328e2a7b5671fab2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 15 Mar 2016 14:58:38 -0400 Subject: Add multi-byte literal to test data --- tests/sratom_test.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/sratom_test.c b/tests/sratom_test.c index 7f2c37a..49b9357 100644 --- a/tests/sratom_test.c +++ b/tests/sratom_test.c @@ -166,11 +166,12 @@ test(bool top_level, bool pretty_numbers) lv2_atom_forge_key(&forge, eg_string); lv2_atom_forge_string(&forge, "hello", strlen("hello")); - // eg_langlit = (Literal)"bonjour"@fr + // eg_langlit = (Literal)"ni hao"@cmn (but in actual mandarin) + const uint8_t ni_hao[] = { 0xE4, 0xBD, 0xA0, 0xE5, 0xA5, 0xBD }; lv2_atom_forge_key(&forge, eg_langlit); lv2_atom_forge_literal( - &forge, "bonjour", strlen("bonjour"), - 0, urid_map(NULL, "http://lexvo.org/id/iso639-3/fra")); + &forge, (const char*)ni_hao, 6, + 0, urid_map(NULL, "http://lexvo.org/id/iso639-3/cmn")); // eg_typelit = (Literal)"value"^^ lv2_atom_forge_key(&forge, eg_typelit); -- cgit v1.2.1