From b2ce682f6ed9493423be257a5b2e87126692a94f Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 25 Feb 2014 09:31:47 -0300 Subject: -scripts are converted to bytecode on export -fix bug in doc where touchscreen events were not documented --- bin/tests/test_gdscript.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'bin/tests/test_gdscript.cpp') 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 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); -- cgit v1.2.3-70-g09d2