Test: animation, avoid segfault in keylist unit tests

Replace `EXPECT_NE(column, nullptr)` with `ASSERT_NE(column, nullptr)` to
abort the test on failure. With `EXPECT_NE`, the test would continue onto
the next like, which accesses `column->cfra` and would segfault.

No functional changes to the tests. Just better reporting of failures.
This commit is contained in:
Sybren A. Stüvel
2022-12-06 12:12:15 +01:00
parent 997ff54d30
commit 979930f8b6

View File

@@ -51,7 +51,7 @@ static void assert_act_key_column(const ActKeyColumn *column,
const std::optional<float> expected_frame)
{
if (expected_frame.has_value()) {
EXPECT_NE(column, nullptr);
ASSERT_NE(column, nullptr);
EXPECT_NEAR(column->cfra, *expected_frame, KEYLIST_NEAR_ERROR);
}
else {