Fixed tests not passing due to 1-indexed system vs 0-indexed thinking
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:
@@ -14,7 +14,7 @@ namespace Porygon::UserData{
|
|||||||
UserDataCollectionRangeIterator(size_t start, size_t end){
|
UserDataCollectionRangeIterator(size_t start, size_t end){
|
||||||
_start = start;
|
_start = start;
|
||||||
_end = end;
|
_end = end;
|
||||||
_current = start;
|
_current = _start;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Evaluation::EvalValue* GetCurrent() final{
|
const Evaluation::EvalValue* GetCurrent() final{
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ end
|
|||||||
auto obj = new UserDataTestObject();
|
auto obj = new UserDataTestObject();
|
||||||
auto parameter = new UserDataValue(HashedString::ConstHash("testObject"), obj);
|
auto parameter = new UserDataValue(HashedString::ConstHash("testObject"), obj);
|
||||||
auto result = script->CallFunction(u"testFunc", {parameter});
|
auto result = script->CallFunction(u"testFunc", {parameter});
|
||||||
REQUIRE(result->EvaluateInteger() == 6);
|
REQUIRE(result->EvaluateInteger() == 10);
|
||||||
delete obj;
|
delete obj;
|
||||||
delete parameter;
|
delete parameter;
|
||||||
delete script;
|
delete script;
|
||||||
|
|||||||
Reference in New Issue
Block a user