Mjolnir Core
Core functionality of the Mjolnir API

◆ ASSERT_NUM_DELETE_EQ

#define ASSERT_NUM_DELETE_EQ (   num_delete_exp)    ASSERT_EQ(new_delete_counter.get_num_delete_calls(), num_delete_exp)

Assert that the number of delete calls are equal to the passed number.

Requires a variable with name new_delete_counter and the type NewDeleteCounter that is valid in the current scope. The macro COUNT_NEW_AND_DELETE performs the required initialization. This macro should only be used in a test using gtest.h and relies on ASSERT_EQ. The test is passed if the number of delete calls since the macro COUNT_NEW_AND_DELETE was used is equal to the passed number. Otherwise, the test fails immediately.

If DISABLE_NEW_DELETE_COUNTER is defined, this macro does nothing.

Parameters
num_delete_expExpected number of delete calls