diff options
Diffstat (limited to 'bin/tests/test_gdscript.cpp')
-rw-r--r-- | bin/tests/test_gdscript.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/bin/tests/test_gdscript.cpp b/bin/tests/test_gdscript.cpp index 48f982425b..9670e6af6e 100644 --- a/bin/tests/test_gdscript.cpp +++ b/bin/tests/test_gdscript.cpp @@ -35,10 +35,10 @@ #ifdef GDSCRIPT_ENABLED -#include "script/gdscript/gd_tokenizer.h" -#include "script/gdscript/gd_parser.h" -#include "script/gdscript/gd_compiler.h" -#include "script/gdscript/gd_script.h" +#include "modules/gdscript/gd_tokenizer.h" +#include "modules/gdscript/gd_parser.h" +#include "modules/gdscript/gd_compiler.h" +#include "modules/gdscript/gd_script.h" namespace TestGDScript { @@ -864,7 +864,7 @@ MainLoop* test(TestType p_test) { if (p_test==TEST_TOKENIZER) { - GDTokenizer tk; + GDTokenizerText tk; tk.set_code(code); int line=-1; while(tk.get_token()!=GDTokenizer::TK_EOF) { @@ -969,8 +969,16 @@ MainLoop* test(TestType p_test) { + } else if (p_test==TEST_BYTECODE) { + + Vector<uint8_t> buf = GDTokenizerBuffer::parse_code_string(code); + String dst = test.basename()+".gdc"; + FileAccess *fw = FileAccess::open(dst,FileAccess::WRITE); + fw->store_buffer(buf.ptr(),buf.size()); + memdelete(fw); } + #if 0 Parser parser; Error err = parser.parse(code); |