Fixes and improvements for new table system
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-09-19 11:28:00 +02:00
parent 6c6d977000
commit 24923deed0
4 changed files with 16 additions and 5 deletions

View File

@@ -98,6 +98,18 @@ table.foo = 500
delete script;
}
TEST_CASE( "Dynamic numerical table size", "[integration]" ) {
Script* script = Script::Create(
R"(
table = {}
table[1] = 500
return table[1]
)");
REQUIRE(!script->Diagnostics -> HasErrors());
auto result = script->Evaluate();
CHECK(result -> EvaluateInteger() == 500);
delete script;
}
#endif