Greatly simplify handling numerical eval values, using std::variant
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -51,10 +51,10 @@ TEST_CASE( "Define script function and call from extern", "[integration]" ) {
|
||||
script->Evaluate();
|
||||
|
||||
REQUIRE(script->HasFunction(u"add"));
|
||||
auto toAddVal = new IntegerEvalValue(5);
|
||||
auto toAddVal = new NumericEvalValue(5);
|
||||
script->CallFunction(u"add", {toAddVal});
|
||||
delete toAddVal;
|
||||
toAddVal = new IntegerEvalValue(6);
|
||||
toAddVal = new NumericEvalValue(6);
|
||||
script->CallFunction(u"add", {toAddVal});
|
||||
delete toAddVal;
|
||||
|
||||
@@ -76,8 +76,8 @@ TEST_CASE( "Define script function and return", "[integration]" ) {
|
||||
script->Evaluate();
|
||||
|
||||
REQUIRE(script->HasFunction(u"add"));
|
||||
auto toAddVal = new IntegerEvalValue(5);
|
||||
auto toAddVal2 = new IntegerEvalValue(6);
|
||||
auto toAddVal = new NumericEvalValue(5);
|
||||
auto toAddVal2 = new NumericEvalValue(6);
|
||||
auto result = script->CallFunction(u"add", {toAddVal, toAddVal2});
|
||||
delete toAddVal;
|
||||
delete toAddVal2;
|
||||
|
||||
Reference in New Issue
Block a user