[Fix] (MG_Test/Program): use Setup() instead of ctor

This commit is contained in:
2025-08-14 17:20:33 +08:00
parent a4556a3742
commit c9fd4ecb8f
+2 -5
View File
@@ -8,12 +8,9 @@ using namespace MobileGL::MG_Impl::GLImpl;
class ProgramTest : public ::testing::Test {
protected:
ProgramTest() {
mGLContext = MakeUnique<MG_State::GLState::GLContext>();
MG_State::pGLContext = mGLContext.get();
void SetUp() override {
MG_State::pGLContext = new MG_State::GLState::GLContext();
}
private:
UniquePtr<MG_State::GLState::GLContext> mGLContext;
};
TEST_F(ProgramTest, Sanity) {