MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / keyOrder

Function keyOrder

source/test/formatted_json_test.cpp:76–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76List<String> keyOrder(FormattedJson const& json) {
77 List<String> keys;
78 for (JsonElement const& elem : json.elements()) {
79 if (elem.is<ObjectKeyElement>())
80 keys.append(elem.get<ObjectKeyElement>().key);
81 }
82 return keys;
83}
84
85TEST(FormattedJsonTest, ObjectInsertion) {
86 FormattedJson json = FormattedJson::ofType(Json::Type::Object);

Callers 1

TESTFunction · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected