Make compile take a name argument
Start work on JSON fixture grammar
This commit is contained in:
parent
bb42543f1b
commit
5776846227
12 changed files with 603 additions and 24 deletions
22
spec/runtime/json_spec.cpp
Normal file
22
spec/runtime/json_spec.cpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue