tree-sitter/spec/runtime/json_spec.cpp
Max Brunsfeld 5776846227 Make compile take a name argument
Start work on JSON fixture grammar
2014-01-23 13:48:07 -08:00

22 lines
No EOL
478 B
C++

#include "spec_helper.h"
#include "document.h"
extern TSParseConfig ts_parse_config_json;
START_TEST
describe("json", []() {
TSDocument *document;
before_each([&]() {
document = TSDocumentMake();
TSDocumentSetUp(document, ts_parse_config_json);
});
it("parses strings", [&]() {
TSDocumentSetText(document, "\"foo\"");
AssertThat(string(TSDocumentToString(document)), Equals("(value (string))"));
});
});
END_TEST