diff --git a/renderdoc/core/intervals_tests.cpp b/renderdoc/core/intervals_tests.cpp index 69e5eabc1..5d43654da 100644 --- a/renderdoc/core/intervals_tests.cpp +++ b/renderdoc/core/intervals_tests.cpp @@ -61,8 +61,7 @@ Intervals make_intervals(const rdcarray &intervals) { auto j = res.end(); j--; - if(i->start > j->start()) - j->split(i->start); + RDCASSERTMSG("make_intervals parameters must fully specify intervals", i->start == j->start()); if(i->end < j->finish()) { j->split(i->end); @@ -284,15 +283,14 @@ TEST_CASE("Test Intervals type", "[intervals]") SECTION("update an empty interval at 0") { Intervals test = make_intervals({{0, 0, 5}, {5, 1, 10}, {10, 0, UINT64_MAX}}); - test.update(0, 0, 1, [](uint64_t x, uint64_t y) -> uint64_t { return x + y; }); + test.update(0, 0, 1, [](uint64_t x, uint64_t y) -> uint64_t { return 99; }); check_intervals(test, {{0, 0, 5}, {5, 1, 10}, {10, 0, UINT64_MAX}}); }; SECTION("update an empty interval at UINT64_MAX") { Intervals test = make_intervals({{0, 0, 5}, {5, 1, 10}, {10, 0, UINT64_MAX}}); - test.update(UINT64_MAX, UINT64_MAX, 1, - [](uint64_t x, uint64_t y) -> uint64_t { return x + y; }); + test.update(UINT64_MAX, UINT64_MAX, 1, [](uint64_t x, uint64_t y) -> uint64_t { return 99; }); check_intervals(test, {{0, 0, 5}, {5, 1, 10}, {10, 0, UINT64_MAX}}); }; };