| 213 | } |
| 214 | |
| 215 | inline void test_script(const String &helper_script_path, int revision, bool helper_script, bool no_text_equality_check) { |
| 216 | // tests are located in modules/gdsdecomp/helpers |
| 217 | auto da = DirAccess::create_for_path(helper_script_path); |
| 218 | CHECK(da.is_valid()); |
| 219 | CHECK(da->file_exists(helper_script_path)); |
| 220 | Error err; |
| 221 | auto helper_script_text = FileAccess::get_file_as_string(helper_script_path, &err); |
| 222 | CHECK(err == OK); |
| 223 | CHECK(helper_script_text != ""); |
| 224 | auto script_name = helper_script_path.get_file().get_basename(); |
| 225 | test_script_text(script_name, helper_script_text, revision, helper_script, no_text_equality_check); |
| 226 | } |
| 227 | |
| 228 | TEST_CASE("[GDSDecomp][Bytecode] GDScriptTokenizer outputs bytecode_version == LATEST_GDSCRIPT_VERSION") { |
| 229 | auto buf = GDScriptTokenizerBuffer::parse_code_string("", GDScriptTokenizerBuffer::CompressMode::COMPRESS_NONE); |
no test coverage detected