Make compile take a name argument

Start work on JSON fixture grammar
This commit is contained in:
Max Brunsfeld 2014-01-23 13:44:49 -08:00
parent bb42543f1b
commit 5776846227
12 changed files with 603 additions and 24 deletions

View 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