Skip to content

Commit 1ee4199

Browse files
committed
Started adding tests for find.
1 parent 677e2b9 commit 1ee4199

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

interval_tree.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ namespace lib_interval_tree
811811
{
812812
if (root_ == nullptr)
813813
return end();
814-
return iterator{find_i(from.node_, ival, compare), this};
814+
return iterator{find_i((++from).node_, ival, compare), this};
815815
}
816816

817817
/**
@@ -864,7 +864,7 @@ namespace lib_interval_tree
864864
{
865865
if (root_ == nullptr)
866866
return end();
867-
return iterator{find_i(root_, ival, compare), this};
867+
return iterator{find_i(begin().node_, ival, compare), this};
868868
}
869869

870870
/**

tests/tests.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
#include "interval_tests.hpp"
99
#include "insert_tests.hpp"
1010
#include "erase_tests.hpp"
11-
#include "overlap_tests.hpp"
11+
#include "find_tests.hpp"
12+
#include "overlap_find_tests.hpp"
1213

1314
int main(int argc, char** argv)
1415
{

0 commit comments

Comments
 (0)