1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 10:45:34 +00:00

Merge branch 'fix_lua_test' into 'master'

Fix LuaUtilPackageTest.Transform

See merge request OpenMW/openmw!1302
This commit is contained in:
Petr Mikheev 2021-10-18 07:16:10 +00:00
commit 17f7a1a2ea

View file

@ -91,7 +91,7 @@ namespace
lua.safe_script("moveAndScale = T.move(v(1, 2, 3)) * T.scale(0.5, 1, 0.5) * T.move(10, 20, 30)");
EXPECT_EQ(getAsString(lua, "moveAndScale * v(0, 0, 0)"), "(6, 22, 18)");
EXPECT_EQ(getAsString(lua, "moveAndScale * v(300, 200, 100)"), "(156, 222, 68)");
EXPECT_EQ(getAsString(lua, "moveAndScale"), "TransformM{ move(6, 22, 18) scale(0.5, 1, 0.5) }");
EXPECT_THAT(getAsString(lua, "moveAndScale"), AllOf(StartsWith("TransformM{ move(6, 22, 18) scale(0.5, 1, 0.5) "), EndsWith(" }")));
EXPECT_EQ(getAsString(lua, "T.identity"), "TransformM{ }");
lua.safe_script("rx = T.rotateX(math.pi / 2)");
lua.safe_script("ry = T.rotateY(math.pi / 2)");