diff options
| author | Juan Linietsky | 2014-02-25 09:31:47 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2014-02-25 09:31:47 -0300 |
| commit | b2ce682f6ed9493423be257a5b2e87126692a94f (patch) | |
| tree | 705a351239b0f87c0e7166c5948716a054ca98d8 /bin/tests/test_gdscript.cpp | |
| parent | 06e358199f0c038e781753001d9292349f2040ad (diff) | |
| download | godot-b2ce682f6ed9493423be257a5b2e87126692a94f.tar.gz godot-b2ce682f6ed9493423be257a5b2e87126692a94f.tar.zst godot-b2ce682f6ed9493423be257a5b2e87126692a94f.zip | |
Diffstat (limited to 'bin/tests/test_gdscript.cpp')
| -rw-r--r-- | bin/tests/test_gdscript.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/tests/test_gdscript.cpp b/bin/tests/test_gdscript.cpp index 847be39fb..9670e6af6 100644 --- a/bin/tests/test_gdscript.cpp +++ b/bin/tests/test_gdscript.cpp @@ -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); |
