parent
6c8ec46725
commit
28081bfd3e
|
@ -223,7 +223,6 @@ bool CBotDefParam::HasDefault()
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void CBotDefParam::RestoreState(CBotStack* &pj, bool bMain)
|
void CBotDefParam::RestoreState(CBotStack* &pj, bool bMain)
|
||||||
{
|
{
|
||||||
assert(this != nullptr);
|
|
||||||
CBotDefParam* p = this;
|
CBotDefParam* p = this;
|
||||||
|
|
||||||
CBotStack* pile = nullptr;
|
CBotStack* pile = nullptr;
|
||||||
|
|
|
@ -216,15 +216,15 @@ protected:
|
||||||
if (error != CBotNoErr)
|
if (error != CBotNoErr)
|
||||||
{
|
{
|
||||||
ADD_FAILURE() << "Compile error - " << error << " (" << cursor1 << "-" << (cursor2 >= 0 ? cursor2 : cursor1) << ")" << std::endl << GetFormattedLineInfo(code, cursor1); // TODO: Error messages are on Colobot side
|
ADD_FAILURE() << "Compile error - " << error << " (" << cursor1 << "-" << (cursor2 >= 0 ? cursor2 : cursor1) << ")" << std::endl << GetFormattedLineInfo(code, cursor1); // TODO: Error messages are on Colobot side
|
||||||
return std::move(program);
|
return program;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ADD_FAILURE() << "No compile error, expected " << expectedCompileError; // TODO: Error messages are on Colobot side
|
ADD_FAILURE() << "No compile error, expected " << expectedCompileError; // TODO: Error messages are on Colobot side
|
||||||
return std::move(program);
|
return program;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (expectedCompileError != CBotNoErr) return std::move(program);
|
if (expectedCompileError != CBotNoErr) return program;
|
||||||
|
|
||||||
for (const std::string& test : tests)
|
for (const std::string& test : tests)
|
||||||
{
|
{
|
||||||
|
@ -285,7 +285,7 @@ protected:
|
||||||
ADD_FAILURE() << ss.str();
|
ADD_FAILURE() << ss.str();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return std::move(program); // Take it if you want, destroy on exit otherwise
|
return program; // Take it if you want, destroy on exit otherwise
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue