From 3c097883c447164059c9333b442d0657ba80fbd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petri=20H=C3=A4kkinen?= Date: Wed, 15 Nov 2023 11:15:04 +0200 Subject: [PATCH] Add unit test for type() --- tests/Compiler.test.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/Compiler.test.cpp b/tests/Compiler.test.cpp index 76fe0207..c605a364 100644 --- a/tests/Compiler.test.cpp +++ b/tests/Compiler.test.cpp @@ -4507,6 +4507,11 @@ RETURN R0 0 LOADK R0 K0 [0, 0, 0] LOADK R1 K1 [-0, 0, 0] RETURN R0 2 +)"); + + CHECK_EQ("\n" + compileFunction("return type(Vector3.new(0, 0, 0))", 0, 2, /*enableVectors*/ true), R"( +LOADK R0 K0 ['vector'] +RETURN R0 1 )"); }