45 lines
1 KiB
C++
45 lines
1 KiB
C++
////////////////////////////////////////////////////////////////////////////////
|
|
// (c) Copyright, Ubisoft Entertainment Inc. || Created by Harbour //
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
#include "tests/config.h"
|
|
#include "tests/fixture/memoryCheckFixture.h"
|
|
#include <ubiservices/core/types/string.h>
|
|
|
|
namespace US_NS {;
|
|
US_DEFINE_TEST(TestOptions);
|
|
|
|
typedef US_NS::LeakChecker LEAKCHECKER;
|
|
|
|
//The Memory Integrity Check is disabled in Profile.
|
|
#if !defined(US_PROFILE)
|
|
|
|
TEST_F(LEAKCHECKER, LOCAL_LeakPositive)
|
|
{
|
|
m_willLeak = true;
|
|
US_NEW(US_NS::String);
|
|
}
|
|
|
|
TEST_F(LEAKCHECKER, LOCAL_LOCALUNITTESTS_LeakMight)
|
|
{
|
|
m_mightLeak = true; // Might leaks...
|
|
US_NEW(US_NS::String); // ...and leaks
|
|
}
|
|
|
|
TEST_F(LEAKCHECKER, LOCAL_LOCALUNITTESTS_LeakMight2)
|
|
{
|
|
m_mightLeak = true; // Might leaks...
|
|
//US_NEW(US_NS::String); // ...but does not leak
|
|
}
|
|
|
|
#endif
|
|
|
|
#if defined(US_PROFILE)
|
|
|
|
/// @test Empty test to verify the allocation of the LeackChecker
|
|
TEST_F(LEAKCHECKER, LOCAL_Empty)
|
|
{
|
|
}
|
|
|
|
#endif
|
|
|
|
};
|