Added IndexOf support for List.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user