Skip to content

Commit

Permalink
Add a test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Keita Iwabuchi committed Aug 16, 2024
1 parent 41a0705 commit 33ada83
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/container/fallback_allocator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,20 @@ TEST(FallbackAllocatorAdaptorTest, Types) {
}
}

TEST(FallbackAllocatorAdaptorTest, Availability) {
{
fb_alloc_type<int> allocator;
ASSERT_TRUE(!allocator.stateful_allocator_available());
}

{
metall::manager manager(metall::create_only, dir_path(),
1UL << 27UL);
auto allocator = fb_alloc_type<int>(manager.get_allocator<int>());
ASSERT_TRUE(allocator.stateful_allocator_available());
}
}

TEST(FallbackAllocatorAdaptorTest, Exception) {
fb_alloc_type<int> allocator;

Expand Down

0 comments on commit 33ada83

Please sign in to comment.