fix unit tests
This commit is contained in:
@@ -724,7 +724,7 @@ std::ostream& operator<< (std::ostream& out, ePicType pic) {
|
||||
}
|
||||
|
||||
std::istream& operator>> (std::istream& in, ePicType& pic) {
|
||||
if(!readEnum(in, pic, pic_type_strs, PIC_NONE))
|
||||
if(!readEnum(in, pic, pic_type_strs, NUM_PIC_TYPES))
|
||||
in.setstate(std::ios::failbit);
|
||||
return in;
|
||||
}
|
||||
|
@@ -1685,7 +1685,7 @@ void readTownFromXml(ticpp::Document&& data, cTown*& town, cScenario& scen) {
|
||||
if(num_timers >= 8)
|
||||
throw xBadNode(type, elem->Row(), elem->Column(), fname);
|
||||
readTimerFromXml(*elem, town->timers[num_timers]);
|
||||
town->timers[num_timers].node_type = eSpecCtxType::SCEN;
|
||||
town->timers[num_timers].node_type = eSpecCtxType::TOWN;
|
||||
num_timers++;
|
||||
} else if(type == "flags") {
|
||||
Iterator<Element> flag;
|
||||
|
@@ -41,6 +41,6 @@
|
||||
<default-ground>2</default-ground>
|
||||
<last-out-section x="0" y="0" />
|
||||
<last-town>0</last-town>
|
||||
<graphics><pic index='1'>20</pic></graphics>
|
||||
<graphics><pic index='1'>250</pic></graphics>
|
||||
</editor>
|
||||
</scenario>
|
||||
|
@@ -284,7 +284,7 @@ TEST_CASE("When converting legacy special nodes (general)") {
|
||||
oldSpec.ex1a = 1;
|
||||
newSpec.import_legacy(oldSpec);
|
||||
CHECK(newSpec.type == eSpecType::CANT_ENTER);
|
||||
CHECK(newSpec.ex1a == 1);
|
||||
CHECK(newSpec.ex1a == 0);
|
||||
CHECK(newSpec.ex2a == 0);
|
||||
CHECK(newSpec.jumpto == 12);
|
||||
}
|
||||
|
Reference in New Issue
Block a user