Skip to content

Commit

Permalink
Fix assertions from MSVC about mismatched iterators
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronwhite committed Nov 19, 2024
1 parent 88eb18c commit 4e6b83a
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions test/score/test_staff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,10 @@ TEST_CASE("Score/Staff/GetPositionsInRange")
voice.insertPosition(pos7);
voice.insertPosition(pos8);

REQUIRE(std::distance(
ScoreUtils::findInRange(voice.getPositions(), 9, 15).begin(),
ScoreUtils::findInRange(voice.getPositions(), 9, 15).end()) ==
0);
REQUIRE(std::distance(
ScoreUtils::findInRange(voice.getPositions(), 8, 10).begin(),
ScoreUtils::findInRange(voice.getPositions(), 8, 10).end()) ==
1);
REQUIRE(std::distance(
ScoreUtils::findInRange(voice.getPositions(), 4, 7).begin(),
ScoreUtils::findInRange(voice.getPositions(), 4, 7).end()) ==
3);
std::span<Position> positions = voice.getPositions();
REQUIRE(std::ranges::distance(ScoreUtils::findInRange(positions, 9, 15)) == 0);
REQUIRE(std::ranges::distance(ScoreUtils::findInRange(positions, 8, 10)) == 1);
REQUIRE(std::ranges::distance(ScoreUtils::findInRange(positions, 4, 7)) == 3);
}

TEST_CASE("Score/Staff/GetNextNote")
Expand Down

0 comments on commit 4e6b83a

Please sign in to comment.