Avoid using IsNull bandit assertion
This commit is contained in:
parent
b43ae2826b
commit
cc7277fd7d
3 changed files with 3 additions and 3 deletions
|
|
@ -25,7 +25,7 @@ for (auto &language_name : test_languages) {
|
|||
it("fails with the correct error message", [&]() {
|
||||
TSCompileResult compile_result = ts_compile_grammar(grammar_json.c_str());
|
||||
string expected_error = read_file(expected_error_path);
|
||||
AssertThat((void *)compile_result.error_message, !IsNull());
|
||||
AssertThat((void *)compile_result.error_message, !Equals<void *>(nullptr));
|
||||
AssertThat(compile_result.error_message, Equals(expected_error));
|
||||
});
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ describe("Document", [&]() {
|
|||
AssertThat(ts_language_version(&language), !Equals<uint32_t>(TREE_SITTER_LANGUAGE_VERSION));
|
||||
|
||||
ts_document_set_language(document, &language);
|
||||
AssertThat(ts_document_language(document), IsNull());
|
||||
AssertThat(ts_document_language(document), Equals<const TSLanguage *>(nullptr));
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -533,7 +533,7 @@ describe("Stack", [&]() {
|
|||
});
|
||||
|
||||
it("allows the state to be retrieved", [&]() {
|
||||
AssertThat(ts_stack_last_external_token(stack, 0), Equals(nullptr));
|
||||
AssertThat(ts_stack_last_external_token(stack, 0), Equals<Tree *>(nullptr));
|
||||
|
||||
ts_stack_set_last_external_token(stack, 0, trees[1]);
|
||||
AssertThat(ts_stack_last_external_token(stack, 0), Equals(trees[1]));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue