Skip to content

Commit

Permalink
removing maybe_unused for win build
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Fishgait committed Oct 9, 2023
1 parent 0a3b42f commit df0fc3e
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions tests/src/unit-allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ struct NAlloc

return static_cast<pointer>(alloc.allocate(n)); // get memory from pool
}
void deallocate(pointer p, [[maybe_unused]] std::size_t n)
void deallocate(pointer p, std::size_t n)
{
m_alloc_size = n;
alloc.deallocate(static_cast<pointer>(p), 1); // return memory to pool
Expand Down Expand Up @@ -342,16 +342,7 @@ TEST_CASE("controlled bad_alloc_rt_string")

SECTION("json_value(value_t)")
{

SECTION("array")
{
next_construct_fails = false;
auto t = my_json::value_t::array;
CHECK_NOTHROW(my_allocator_clean_up(my_json::json_value(t).array));
next_construct_fails = true;
CHECK_THROWS_AS(my_json::json_value(t), std::bad_alloc&);
next_construct_fails = false;
}

SECTION("string")
{
next_construct_fails = false;
Expand Down

0 comments on commit df0fc3e

Please sign in to comment.