mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
[Core] Add LocalVector::has for convenience
This commit is contained in:
parent
d8aa2c65a9
commit
86de59d60a
12 changed files with 27 additions and 14 deletions
|
|
@ -63,7 +63,7 @@ TEST_CASE("[LocalVector] Push Back.") {
|
|||
CHECK(vector[4] == 4);
|
||||
}
|
||||
|
||||
TEST_CASE("[LocalVector] Find.") {
|
||||
TEST_CASE("[LocalVector] Find, has.") {
|
||||
LocalVector<int> vector;
|
||||
vector.push_back(3);
|
||||
vector.push_back(1);
|
||||
|
|
@ -85,6 +85,15 @@ TEST_CASE("[LocalVector] Find.") {
|
|||
|
||||
CHECK(vector.find(-1) == -1);
|
||||
CHECK(vector.find(5) == -1);
|
||||
|
||||
CHECK(vector.has(0));
|
||||
CHECK(vector.has(1));
|
||||
CHECK(vector.has(2));
|
||||
CHECK(vector.has(3));
|
||||
CHECK(vector.has(4));
|
||||
|
||||
CHECK(!vector.has(-1));
|
||||
CHECK(!vector.has(5));
|
||||
}
|
||||
|
||||
TEST_CASE("[LocalVector] Remove.") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue