Fixed tests not passing due to 1-indexed system vs 0-indexed thinking
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2019-08-15 11:53:40 +02:00
parent 471dbac3b9
commit 5b3bc26bdb
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 2 additions and 2 deletions

View File

@ -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{

View File

@ -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;