diff --git a/test.cpp b/test.cpp index 3bfe2e0..f3c3301 100644 --- a/test.cpp +++ b/test.cpp @@ -91,6 +91,14 @@ int main(int argc, char **argv) { assert(uni[0].string_value().size() == (sizeof utf8) - 1); assert(memcmp(uni[0].string_value().data(), utf8, sizeof utf8) == 0); + // Demonstrates the behavior change in Xcode 7 / Clang 3.7 described + // here: https://llvm.org/bugs/show_bug.cgi?id=23812 + Json nested_array = Json::array { Json::array { 1, 2, 3 } }; + assert(nested_array.is_array()); + assert(nested_array.array_items().size() == 1); + assert(nested_array.array_items()[0].is_array()); + assert(nested_array.array_items()[0].array_items().size() == 3); + Json my_json = Json::object { { "key1", "value1" }, { "key2", false },