From 519d1c0030d1b605ff3f67b9aafb35f2ef7487c4 Mon Sep 17 00:00:00 2001 From: Zuhanit Date: Fri, 6 Mar 2026 11:38:36 +0900 Subject: [PATCH] fix: update outdated epscript test --- src/epscript/test/parser/test_complex.cpp | 6 ++---- src/epscript/test/parser/test_ctrlstru.cpp | 3 ++- src/epscript/test/parser/test_debuginfo.cpp | 5 ++--- src/epscript/test/parser/test_globalv.cpp | 3 +-- src/epscript/test/parser/test_staticv.cpp | 4 ++-- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/epscript/test/parser/test_complex.cpp b/src/epscript/test/parser/test_complex.cpp index 548662f8..d258de72 100644 --- a/src/epscript/test/parser/test_complex.cpp +++ b/src/epscript/test/parser/test_complex.cpp @@ -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" ); diff --git a/src/epscript/test/parser/test_ctrlstru.cpp b/src/epscript/test/parser/test_ctrlstru.cpp index f037a63b..90ab3fe2 100644 --- a/src/epscript/test/parser/test_ctrlstru.cpp +++ b/src/epscript/test/parser/test_ctrlstru.cpp @@ -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" ); diff --git a/src/epscript/test/parser/test_debuginfo.cpp b/src/epscript/test/parser/test_debuginfo.cpp index 803ecc0d..d8da2e2a 100644 --- a/src/epscript/test/parser/test_debuginfo.cpp +++ b/src/epscript/test/parser/test_debuginfo.cpp @@ -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" ); } diff --git a/src/epscript/test/parser/test_globalv.cpp b/src/epscript/test/parser/test_globalv.cpp index 549a64fb..5aa2b89e 100644 --- a/src/epscript/test/parser/test_globalv.cpp +++ b/src/epscript/test/parser/test_globalv.cpp @@ -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( diff --git a/src/epscript/test/parser/test_staticv.cpp b/src/epscript/test/parser/test_staticv.cpp index 66f00fbc..a0dade78 100644 --- a/src/epscript/test/parser/test_staticv.cpp +++ b/src/epscript/test/parser/test_staticv.cpp @@ -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"); }