Added IndexOf support for List.
continuous-integration/drone/push Build is passing

This commit is contained in:
Deukhoofd committed 2020-03-24 22:56:40 +01:00
1 parent 0b6220b2bf
commit 7524c2d61c
2 files changed
+20 -3

No files matched your search

+9
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