From c9fd4ecb8f2f2276609afbe858c1dcc8e810c3b2 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Thu, 14 Aug 2025 17:20:33 +0800 Subject: [PATCH] [Fix] (MG_Test/Program): use Setup() instead of ctor --- MobileGL/MG_Test/Program/ProgramTest.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/MobileGL/MG_Test/Program/ProgramTest.cpp b/MobileGL/MG_Test/Program/ProgramTest.cpp index 7cd95456..7df5f02a 100644 --- a/MobileGL/MG_Test/Program/ProgramTest.cpp +++ b/MobileGL/MG_Test/Program/ProgramTest.cpp @@ -8,12 +8,9 @@ using namespace MobileGL::MG_Impl::GLImpl; class ProgramTest : public ::testing::Test { protected: - ProgramTest() { - mGLContext = MakeUnique(); - MG_State::pGLContext = mGLContext.get(); + void SetUp() override { + MG_State::pGLContext = new MG_State::GLState::GLContext(); } -private: - UniquePtr mGLContext; }; TEST_F(ProgramTest, Sanity) {