Enables memory tracking (leak detection) in more unit tests

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-12-03 14:32:27 -08:00
parent 03adf700fe
commit 0dbf1b0b43
19 changed files with 29 additions and 21 deletions
@@ -19,7 +19,7 @@ using namespace ::testing;
namespace UnitTest
{
class TestingClickableLabel
: public testing::Test
: public ScopedAllocatorSetupFixture
{
public:
ClickableLabel m_clickableLabel;
@@ -11,6 +11,7 @@
#include <AzCore/base.h>
#include <AzCore/Memory/SystemAllocator.h>
#include <AzCore/Debug/TraceMessageBus.h>
#include <AzCore/UnitTest/TestTypes.h>
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
#include <AzToolsFramework/Application/ToolsApplication.h>
@@ -22,7 +23,7 @@ namespace CryEditDocPythonBindingsUnitTests
{
class CryEditDocPythonBindingsFixture
: public testing::Test
: public ::UnitTest::ScopedAllocatorSetupFixture
{
public:
AzToolsFramework::ToolsApplication m_app;
@@ -11,6 +11,7 @@
#include <AzCore/base.h>
#include <AzCore/Memory/SystemAllocator.h>
#include <AzCore/Debug/TraceMessageBus.h>
#include <AzCore/UnitTest/TestTypes.h>
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
#include <AzToolsFramework/Application/ToolsApplication.h>
@@ -24,7 +25,7 @@ namespace CryEditPythonBindingsUnitTests
{
class CryEditPythonBindingsFixture
: public testing::Test
: public ::UnitTest::ScopedAllocatorSetupFixture
{
public:
AzToolsFramework::ToolsApplication m_app;
@@ -22,7 +22,7 @@ namespace DisplaySettingsPythonBindingsUnitTests
{
class DisplaySettingsPythonBindingsFixture
: public testing::Test
: public UnitTest::ScopedAllocatorSetupFixture
{
public:
AzToolsFramework::ToolsApplication m_app;
@@ -51,7 +51,7 @@ namespace DisplaySettingsPythonBindingsUnitTests
}
class DisplaySettingsComponentFixture
: public testing::Test
: public UnitTest::ScopedAllocatorSetupFixture
{
public:
AzToolsFramework::ToolsApplication m_app;
@@ -12,6 +12,7 @@
#include <AzCore/Memory/SystemAllocator.h>
#include <AzCore/Debug/TraceMessageBus.h>
#include <AzCore/UserSettings/UserSettingsComponent.h>
#include <AzCore/UnitTest/TestTypes.h>
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
#include <AzToolsFramework/Application/ToolsApplication.h>
@@ -79,7 +80,7 @@ namespace EditorPythonBindingsUnitTests
};
class EditorPythonBindingsFixture
: public testing::Test
: public ::UnitTest::ScopedAllocatorSetupFixture
{
public:
AzToolsFramework::ToolsApplication m_app;
+2 -1
View File
@@ -11,6 +11,7 @@
#include <AzCore/base.h>
#include <AzCore/Memory/SystemAllocator.h>
#include <AzCore/Debug/TraceMessageBus.h>
#include <AzCore/UnitTest/TestTypes.h>
namespace EditorUtilsTest
{
@@ -39,7 +40,7 @@ namespace EditorUtilsTest
class TestWarningAbsorber
: public testing::Test
: public ::UnitTest::ScopedAllocatorSetupFixture
{
};
@@ -12,6 +12,7 @@
#include <AzCore/Memory/SystemAllocator.h>
#include <AzCore/Debug/TraceMessageBus.h>
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
#include <AzCore/UnitTest/TestTypes.h>
#include <AzCore/UserSettings/UserSettingsComponent.h>
#include <AzToolsFramework/Application/ToolsApplication.h>
@@ -22,7 +23,7 @@ namespace MainWindowPythonBindingsUnitTests
{
class MainWindowPythonBindingsFixture
: public testing::Test
: public ::UnitTest::ScopedAllocatorSetupFixture
{
public:
AzToolsFramework::ToolsApplication m_app;
@@ -12,6 +12,7 @@
#include <AzCore/Memory/SystemAllocator.h>
#include <AzCore/Debug/TraceMessageBus.h>
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
#include <AzCore/UnitTest/TestTypes.h>
#include <AzCore/UserSettings/UserSettingsComponent.h>
#include <AzToolsFramework/Application/ToolsApplication.h>
@@ -22,7 +23,7 @@ namespace ObjectManagerPythonBindingsUnitTests
{
class ObjectManagerPythonBindingsFixture
: public testing::Test
: public ::UnitTest::ScopedAllocatorSetupFixture
{
public:
AzToolsFramework::ToolsApplication m_app;
@@ -23,7 +23,7 @@ namespace TerrainFuncsUnitTests
{
class TerrainHoleToolPythonBindingsFixture
: public testing::Test
: public UnitTest::ScopedAllocatorSetupFixture
{
public:
AzToolsFramework::ToolsApplication m_app;
@@ -23,7 +23,7 @@ namespace TerrainFuncsUnitTests
{
class TerrainLayerPythonBindingsFixture
: public testing::Test
: public UnitTest::ScopedAllocatorSetupFixture
{
public:
AzToolsFramework::ToolsApplication m_app;
@@ -22,7 +22,7 @@ namespace TerrainModifyPythonBindingsUnitTests
{
class TerrainModifyPythonBindingsFixture
: public testing::Test
: public UnitTest::ScopedAllocatorSetupFixture
{
public:
AzToolsFramework::ToolsApplication m_app;
@@ -23,7 +23,7 @@ namespace TerrainFuncsUnitTests
{
class TerrainPainterPythonBindingsFixture
: public testing::Test
: public UnitTest::ScopedAllocatorSetupFixture
{
public:
AzToolsFramework::ToolsApplication m_app;
@@ -23,7 +23,7 @@ namespace TerrainFuncsUnitTests
{
class TerrainPythonBindingsFixture
: public testing::Test
: public UnitTest::ScopedAllocatorSetupFixture
{
public:
AzToolsFramework::ToolsApplication m_app;
@@ -23,7 +23,7 @@ namespace TerrainFuncsUnitTests
{
class TerrainTexturePythonBindingsFixture
: public testing::Test
: public UnitTest::ScopedAllocatorSetupFixture
{
public:
AzToolsFramework::ToolsApplication m_app;
@@ -12,6 +12,7 @@
#include <AzCore/Memory/SystemAllocator.h>
#include <AzCore/Debug/TraceMessageBus.h>
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
#include <AzCore/UnitTest/TestTypes.h>
#include <AzCore/UserSettings/UserSettingsComponent.h>
#include <AzToolsFramework/Application/ToolsApplication.h>
@@ -22,7 +23,7 @@ namespace TrackViewPythonBindingsUnitTests
{
class TrackViewPythonBindingsFixture
: public testing::Test
: public UnitTest::ScopedAllocatorSetupFixture
{
public:
AzToolsFramework::ToolsApplication m_app;
@@ -81,7 +82,7 @@ namespace TrackViewPythonBindingsUnitTests
}
class TrackViewComponentFixture
: public testing::Test
: public UnitTest::ScopedAllocatorSetupFixture
{
public:
AzToolsFramework::ToolsApplication m_app;
@@ -22,7 +22,7 @@ namespace ViewPaneFuncsUnitTests
{
class ViewPanePythonBindingsFixture
: public testing::Test
: public UnitTest::ScopedAllocatorSetupFixture
{
public:
AzToolsFramework::ToolsApplication m_app;
@@ -12,6 +12,7 @@
#include <AzCore/Memory/SystemAllocator.h>
#include <AzCore/Debug/TraceMessageBus.h>
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
#include <AzCore/UnitTest/TestTypes.h>
#include <AzCore/UserSettings/UserSettingsComponent.h>
#include <AzToolsFramework/Application/ToolsApplication.h>
@@ -22,7 +23,7 @@ namespace ViewportTitleDlgFuncsUnitTests
{
class ViewportTitleDlgPythonBindingsFixture
: public testing::Test
: public UnitTest::ScopedAllocatorSetupFixture
{
public:
AzToolsFramework::ToolsApplication m_app;
@@ -17,7 +17,7 @@ namespace AzFramework
{
// Sets up mock behavior for the xcb library, providing an xcb_connection_t that is returned from a call to xcb_connect
class XcbBaseTestFixture
: public testing::Test
: public UnitTest::ScopedAllocatorSetupFixture
{
public:
void SetUp() override;
@@ -31,7 +31,7 @@ namespace UnitTest
int myReloadValue = 0;
class ScriptComponentTest
: public testing::Test
: public UnitTest::ScopedAllocatorSetupFixture
{
public:
AZ_TYPE_INFO(ScriptComponentTest, "{85CDBD49-70FF-416A-8154-B5525EDD30D4}");