Added IndexOf support for List.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-03-24 22:56:40 +01:00
parent 0b6220b2bf
commit 7524c2d61c
2 changed files with 20 additions and 3 deletions

View File

@@ -60,6 +60,15 @@ TEST_CASE("Create list of bools, assign to it", "[Utilities]") {
CHECK(ls[1]);
}
TEST_CASE("Test IndexOf", "[Utilities]") {
auto ls = List<int>({5, 200, 1500, -500, 5, 300, -500});
CHECK(ls.IndexOf(5) == 0);
CHECK(ls.IndexOf(1500) == 2);
CHECK(ls.IndexOf(300) == 5);
CHECK(ls.IndexOf(684) == -1);
}
#endif