зеркало из https://github.com/Azure/umock-c.git
Fix leaks in tests
This commit is contained in:
Родитель
ff6c9ebb27
Коммит
09d7fefe27
|
@ -45,17 +45,16 @@ BEGIN_TEST_SUITE(umock_c_mock_filters_int_tests)
|
|||
|
||||
TEST_SUITE_INITIALIZE(suite_init)
|
||||
{
|
||||
int result;
|
||||
|
||||
test_mutex = TEST_MUTEX_CREATE();
|
||||
ASSERT_IS_NOT_NULL(test_mutex);
|
||||
|
||||
result = umock_c_init(test_on_umock_c_error);
|
||||
ASSERT_ARE_EQUAL(int, 0, result);
|
||||
ASSERT_ARE_EQUAL(int, 0, umock_c_init(test_on_umock_c_error));
|
||||
}
|
||||
|
||||
TEST_SUITE_CLEANUP(suite_cleanup)
|
||||
{
|
||||
umock_c_deinit();
|
||||
|
||||
TEST_MUTEX_DESTROY(test_mutex);
|
||||
}
|
||||
|
||||
|
|
|
@ -1747,6 +1747,9 @@ TEST_FUNCTION(stringify_for_enum_returns_the_desired_string)
|
|||
|
||||
// assert
|
||||
ASSERT_ARE_EQUAL(char_ptr, "TEST_ENUM_TYPE_VALUE_1", result);
|
||||
|
||||
// cleanup
|
||||
free(result);
|
||||
}
|
||||
|
||||
END_TEST_SUITE(umocktypes_unittests)
|
||||
|
|
Загрузка…
Ссылка в новой задаче