Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/epscript/test/parser/test_complex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@ TEST_CASE("Complex parsing: Integration tests") {
" A[a] = 7;\n"
"}",

"a = EUDCreateVariables(1)\n"
"_IGVA([a], lambda: [1])\n"
"a = _TYGV([None], lambda: [1])\n"
"b = _CGFW(lambda: [2], 1)[0]\n"
"@EUDFunc\n"
"def f_x():\n"
" A = 1\n"
" A.B()\n"
" f_dwread()\n"
" a_1 = EUDVariable()\n"
" a_1 << (f_dwread()[5])\n"
" a_1 = _TYLV([None], [f_dwread()[5]])\n"
" a_1 << (A[5])\n"
" _ARRW(A, a_1) << (7)\n"
);
Expand Down
3 changes: 2 additions & 1 deletion src/epscript/test/parser/test_ctrlstru.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ TEST_CASE("Control block parsing") {
checkBlock(
"once { const A = 1; }",

"if EUDExecuteOnce()():\n"
"_t1 = EUDExecuteOnce()\n"
"if _t1():\n"
" A = 1\n"
"EUDEndExecuteOnce()\n"
);
Expand Down
5 changes: 2 additions & 3 deletions src/epscript/test/parser/test_debuginfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,13 @@ TEST_CASE("Debug info") {

checkBlock(
"static var A = 1;",
"A = EUDVariable(1)" // static variable declaration is not traced.
"A = _TYSV([None], [1])" // static variable declaration is not traced.
);

checkBlock( // Variable declaration with assignments.
"var A = 1;",
"EUDTraceLog(1)\n"
"A = EUDVariable()\n"
"A << (1)\n"
"A = _TYLV([None], [1])\n"
);
}

Expand Down
3 changes: 1 addition & 2 deletions src/epscript/test/parser/test_globalv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ TEST_CASE("Multiple variable") {
check_string(
"var a, b = 1, 2;",

"a, b = EUDCreateVariables(2)\n"
"_IGVA([a, b], lambda: [1, 2])\n"
"a, b = _TYGV([None, None], lambda: [1, 2])\n"
);

check_string(
Expand Down
4 changes: 2 additions & 2 deletions src/epscript/test/parser/test_staticv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
#include "../test_base.hpp"

TEST_CASE("Static variable") {
checkBlock("static var x = 0;", "x = EUDVariable(0)\n");
checkBlock("static var x, y = 0, 1;", "x, y = (EUDVariable(x) for x in (0, 1))\n");
checkBlock("static var x = 0;", "x = _TYSV([None], [0])\n");
checkBlock("static var x, y = 0, 1;", "x, y = _TYSV([None, None], [0, 1])\n");
}
Loading