mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Update windowManagerTest.cpp
test to see if segfault triggers at this point in testing
This commit is contained in:
parent
ce36ea6c0b
commit
0636ba5765
|
|
@ -42,24 +42,29 @@ protected:
|
|||
|
||||
// for tests in this class we probably only need the init_video an nothing else.
|
||||
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_EVENTS | SDL_INIT_NOPARACHUTE);
|
||||
|
||||
pwm = static_cast<PlatformWindowManagerSDL*>(CreatePlatformWindowManager());
|
||||
}
|
||||
|
||||
void SetUp() override
|
||||
{
|
||||
}
|
||||
|
||||
PlatformWindowManagerSDL* pwm;
|
||||
|
||||
void TearDown() override
|
||||
{
|
||||
delete pwm;
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(PlatformWindowManagerSDLTest, Constructor)
|
||||
{
|
||||
PlatformWindowManagerSDL* pwm = static_cast<PlatformWindowManagerSDL*>(CreatePlatformWindowManager());
|
||||
|
||||
ASSERT_TRUE(pwm) << "no monitor to test against!";
|
||||
}
|
||||
|
||||
TEST_F(PlatformWindowManagerSDLTest, PrimaryRectTest)
|
||||
{
|
||||
PlatformWindowManagerSDL* pwm = static_cast<PlatformWindowManagerSDL*>(CreatePlatformWindowManager());
|
||||
|
||||
// Check out the primary desktop area...
|
||||
RectI primary = pwm->getPrimaryDesktopArea();
|
||||
|
||||
|
|
@ -69,8 +74,6 @@ TEST_F(PlatformWindowManagerSDLTest, PrimaryRectTest)
|
|||
|
||||
TEST_F(PlatformWindowManagerSDLTest, MonitorRectsValid)
|
||||
{
|
||||
PlatformWindowManagerSDL* pwm = static_cast<PlatformWindowManagerSDL*>(CreatePlatformWindowManager());
|
||||
|
||||
// Now try to get info about all the monitors.
|
||||
Vector<RectI> monitorRects;
|
||||
pwm->getMonitorRegions(monitorRects);
|
||||
|
|
@ -85,8 +88,6 @@ TEST_F(PlatformWindowManagerSDLTest, MonitorRectsValid)
|
|||
|
||||
TEST_F(PlatformWindowManagerSDLTest, MonitorRectsAtLeastOne)
|
||||
{
|
||||
PlatformWindowManagerSDL* pwm = static_cast<PlatformWindowManagerSDL*>(CreatePlatformWindowManager());
|
||||
|
||||
// Now try to get info about all the monitors.
|
||||
Vector<RectI> monitorRects;
|
||||
pwm->getMonitorRegions(monitorRects);
|
||||
|
|
@ -97,8 +98,6 @@ TEST_F(PlatformWindowManagerSDLTest, MonitorRectsAtLeastOne)
|
|||
|
||||
TEST_F(PlatformWindowManagerSDLTest, MonitorRectsOverflow)
|
||||
{
|
||||
PlatformWindowManagerSDL* pwm = static_cast<PlatformWindowManagerSDL*>(CreatePlatformWindowManager());
|
||||
|
||||
// Now try to get info about all the monitors.
|
||||
Vector<RectI> monitorRects;
|
||||
pwm->getMonitorRegions(monitorRects);
|
||||
|
|
|
|||
Loading…
Reference in a new issue