Remove unusued param
Fixes GCC build Change-Id: I0d89d48bdaa24f4199afa03197e8bbf1a0576b28 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/44803 Commit-Queue: David Neto <dneto@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Auto-Submit: David Neto <dneto@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
3549e2ea8c
commit
5a01b72b98
|
@ -81,12 +81,12 @@ TEST(CastableBase, IsWithPredicate) {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
ASSERT_TRUE((frog->Is<Animal>([](const Animal* a) { return true; })));
|
ASSERT_TRUE((frog->Is<Animal>([](const Animal*) { return true; })));
|
||||||
ASSERT_FALSE((frog->Is<Animal>([](const Animal* a) { return false; })));
|
ASSERT_FALSE((frog->Is<Animal>([](const Animal*) { return false; })));
|
||||||
|
|
||||||
// Predicate not called if cast is invalid
|
// Predicate not called if cast is invalid
|
||||||
auto expect_not_called = [] { FAIL() << "Should not be called"; };
|
auto expect_not_called = [] { FAIL() << "Should not be called"; };
|
||||||
ASSERT_FALSE((frog->Is<Bear>([&](const Animal* a) {
|
ASSERT_FALSE((frog->Is<Bear>([&](const Animal*) {
|
||||||
expect_not_called();
|
expect_not_called();
|
||||||
return true;
|
return true;
|
||||||
})));
|
})));
|
||||||
|
@ -165,12 +165,12 @@ TEST(Castable, IsWithPredicate) {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
ASSERT_TRUE((frog->Is<Animal>([](const Animal* a) { return true; })));
|
ASSERT_TRUE((frog->Is<Animal>([](const Animal*) { return true; })));
|
||||||
ASSERT_FALSE((frog->Is<Animal>([](const Animal* a) { return false; })));
|
ASSERT_FALSE((frog->Is<Animal>([](const Animal*) { return false; })));
|
||||||
|
|
||||||
// Predicate not called if cast is invalid
|
// Predicate not called if cast is invalid
|
||||||
auto expect_not_called = [] { FAIL() << "Should not be called"; };
|
auto expect_not_called = [] { FAIL() << "Should not be called"; };
|
||||||
ASSERT_FALSE((frog->Is<Bear>([&](const Animal* a) {
|
ASSERT_FALSE((frog->Is<Bear>([&](const Animal*) {
|
||||||
expect_not_called();
|
expect_not_called();
|
||||||
return true;
|
return true;
|
||||||
})));
|
})));
|
||||||
|
|
Loading…
Reference in New Issue