Minor test memory cleanup
This commit is contained in:
parent
d49692a17e
commit
7f79c4d8bb
|
@ -44,8 +44,12 @@ TEST_CASE( "Define script function and call from extern", "[integration]" ) {
|
||||||
script->Evaluate();
|
script->Evaluate();
|
||||||
|
|
||||||
REQUIRE(script->HasFunction("add"));
|
REQUIRE(script->HasFunction("add"));
|
||||||
script->CallFunction("add", {new IntegerEvalValue(5)});
|
auto toAddVal = new IntegerEvalValue(5);
|
||||||
script->CallFunction("add", {new IntegerEvalValue(6)});
|
script->CallFunction("add", {toAddVal});
|
||||||
|
delete toAddVal;
|
||||||
|
toAddVal = new IntegerEvalValue(6);
|
||||||
|
script->CallFunction("add", {toAddVal});
|
||||||
|
delete toAddVal;
|
||||||
|
|
||||||
auto result = script->GetVariable("result");
|
auto result = script->GetVariable("result");
|
||||||
REQUIRE(result->GetType()->GetClass() == TypeClass::Number);
|
REQUIRE(result->GetType()->GetClass() == TypeClass::Number);
|
||||||
|
|
Loading…
Reference in New Issue