Make ts_compile_grammar take an optional log file, start logging to it
This commit is contained in:
parent
69d8c6f5e6
commit
6fca8f2f4d
13 changed files with 164 additions and 25 deletions
|
|
@ -27,7 +27,7 @@ for (auto &language_name : test_languages) {
|
|||
|
||||
if (file_exists(expected_error_path)) {
|
||||
it("fails with the correct error message", [&]() {
|
||||
TSCompileResult compile_result = ts_compile_grammar(grammar_json.c_str());
|
||||
TSCompileResult compile_result = ts_compile_grammar(grammar_json.c_str(), nullptr);
|
||||
string expected_error = read_file(expected_error_path);
|
||||
AssertThat((void *)compile_result.error_message, !Equals<void *>(nullptr));
|
||||
AssertThat(compile_result.error_message, Equals(expected_error));
|
||||
|
|
@ -43,7 +43,7 @@ for (auto &language_name : test_languages) {
|
|||
string external_scanner_path = join_path({directory_path, "scanner.c"});
|
||||
if (!file_exists(external_scanner_path)) external_scanner_path = "";
|
||||
|
||||
TSCompileResult compile_result = ts_compile_grammar(grammar_json.c_str());
|
||||
TSCompileResult compile_result = ts_compile_grammar(grammar_json.c_str(), nullptr);
|
||||
|
||||
language = load_test_language(
|
||||
language_name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue