Sha256: 5688019ddafbdf703890650eb5d666917b4129444c5cce1550196c9cac83ebbc
Contents?: true
Size: 737 Bytes
Versions: 1
Compression:
Stored size: 737 Bytes
Contents
// SARU : Tag fastjson // SARU : CxxLibs -L.. -lfastjson #include "saru_cxx.h" #include "fastjson/core.h" #include "fastjson/dom.h" class TestFixture { public: void test_get() { fastjson::dom::Chunk chunk; fastjson::Token token; saru_assert( fastjson::dom::parse_string("{\"key\":\"value\"}", &token, &chunk, 0, NULL, NULL ) ); fastjson::dom::Dictionary_const dict = fastjson::dom::Dictionary_const::as_dict(&token); std::string value; saru_assert( dict.get<std::string>("key", &value ) ); saru_assert_equal("value", value ); } }; int main() { saru::TestLogger logger; SARU_TEST( TestFixture::test_get, logger); logger.printSummary(); return logger.allOK()?0:1; }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simdjson-0.3.0 | vendor/simdjson/dependencies/fastjson/tests/01-dom-00-dict-const-get.cpp |