Skip to content

Commit

Permalink
Merge pull request #146 from manuelmohr/manuelmohr/fix-mux-test
Browse files Browse the repository at this point in the history
[UnitMux] Fix test tear down
  • Loading branch information
coldav authored Oct 4, 2023
2 parents fcd8a60 + e1b0355 commit aa67977
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/mux/test/muxCreateFence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ TEST_P(muxCreateFenceTest, InvalidDevice) {
TEST_P(muxCreateFenceTest, InvalidAllocator) {
mux_fence_t fence;

const mux_allocator_info_t saved_allocator = allocator;

allocator.alloc = nullptr;
allocator.free = nullptr;
ASSERT_ERROR_EQ(mux_error_null_allocator_callback,
Expand All @@ -54,6 +56,9 @@ TEST_P(muxCreateFenceTest, InvalidAllocator) {
allocator.free = nullptr;
ASSERT_ERROR_EQ(mux_error_null_allocator_callback,
muxCreateFence(device, allocator, &fence));

// Restore allocator to properly tear down test
allocator = saved_allocator;
}

TEST_P(muxCreateFenceTest, NullFence) {
Expand Down

0 comments on commit aa67977

Please sign in to comment.