mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
Use EXPECT_THROW instead of handmade try-catch in tests
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
301be3c21b
commit
4395e0c3a1
@@ -953,14 +953,8 @@ void testIDListUnlockOnException() {
|
||||
};
|
||||
|
||||
ListMock l;
|
||||
bool caughtEx = false;
|
||||
try {
|
||||
l.throwExFromLock();
|
||||
} catch (const ExType &) {
|
||||
caughtEx = true;
|
||||
}
|
||||
EXPECT_THROW(l.throwExFromLock(), ExType);
|
||||
|
||||
EXPECT_TRUE(caughtEx);
|
||||
EXPECT_FALSE(l.getLockedRef().test_and_set(std::memory_order_seq_cst));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user