Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Jul 13, 2022
1 parent 5b2561d commit df631f6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/fileio/estreams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion src/fileio/fileio_scen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion test/files/scenario/bad_graphics5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
2 changes: 1 addition & 1 deletion test/spec_legacy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit df631f6

Please sign in to comment.