mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +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
1 changed files with 9 additions and 10 deletions
|
|
@ -42,24 +42,29 @@ protected:
|
||||||
|
|
||||||
// for tests in this class we probably only need the init_video an nothing else.
|
// 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);
|
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
|
void SetUp() override
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PlatformWindowManagerSDL* pwm;
|
||||||
|
|
||||||
|
void TearDown() override
|
||||||
|
{
|
||||||
|
delete pwm;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(PlatformWindowManagerSDLTest, Constructor)
|
TEST_F(PlatformWindowManagerSDLTest, Constructor)
|
||||||
{
|
{
|
||||||
PlatformWindowManagerSDL* pwm = static_cast<PlatformWindowManagerSDL*>(CreatePlatformWindowManager());
|
|
||||||
|
|
||||||
ASSERT_TRUE(pwm) << "no monitor to test against!";
|
ASSERT_TRUE(pwm) << "no monitor to test against!";
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(PlatformWindowManagerSDLTest, PrimaryRectTest)
|
TEST_F(PlatformWindowManagerSDLTest, PrimaryRectTest)
|
||||||
{
|
{
|
||||||
PlatformWindowManagerSDL* pwm = static_cast<PlatformWindowManagerSDL*>(CreatePlatformWindowManager());
|
|
||||||
|
|
||||||
// Check out the primary desktop area...
|
// Check out the primary desktop area...
|
||||||
RectI primary = pwm->getPrimaryDesktopArea();
|
RectI primary = pwm->getPrimaryDesktopArea();
|
||||||
|
|
||||||
|
|
@ -69,8 +74,6 @@ TEST_F(PlatformWindowManagerSDLTest, PrimaryRectTest)
|
||||||
|
|
||||||
TEST_F(PlatformWindowManagerSDLTest, MonitorRectsValid)
|
TEST_F(PlatformWindowManagerSDLTest, MonitorRectsValid)
|
||||||
{
|
{
|
||||||
PlatformWindowManagerSDL* pwm = static_cast<PlatformWindowManagerSDL*>(CreatePlatformWindowManager());
|
|
||||||
|
|
||||||
// Now try to get info about all the monitors.
|
// Now try to get info about all the monitors.
|
||||||
Vector<RectI> monitorRects;
|
Vector<RectI> monitorRects;
|
||||||
pwm->getMonitorRegions(monitorRects);
|
pwm->getMonitorRegions(monitorRects);
|
||||||
|
|
@ -85,8 +88,6 @@ TEST_F(PlatformWindowManagerSDLTest, MonitorRectsValid)
|
||||||
|
|
||||||
TEST_F(PlatformWindowManagerSDLTest, MonitorRectsAtLeastOne)
|
TEST_F(PlatformWindowManagerSDLTest, MonitorRectsAtLeastOne)
|
||||||
{
|
{
|
||||||
PlatformWindowManagerSDL* pwm = static_cast<PlatformWindowManagerSDL*>(CreatePlatformWindowManager());
|
|
||||||
|
|
||||||
// Now try to get info about all the monitors.
|
// Now try to get info about all the monitors.
|
||||||
Vector<RectI> monitorRects;
|
Vector<RectI> monitorRects;
|
||||||
pwm->getMonitorRegions(monitorRects);
|
pwm->getMonitorRegions(monitorRects);
|
||||||
|
|
@ -97,8 +98,6 @@ TEST_F(PlatformWindowManagerSDLTest, MonitorRectsAtLeastOne)
|
||||||
|
|
||||||
TEST_F(PlatformWindowManagerSDLTest, MonitorRectsOverflow)
|
TEST_F(PlatformWindowManagerSDLTest, MonitorRectsOverflow)
|
||||||
{
|
{
|
||||||
PlatformWindowManagerSDL* pwm = static_cast<PlatformWindowManagerSDL*>(CreatePlatformWindowManager());
|
|
||||||
|
|
||||||
// Now try to get info about all the monitors.
|
// Now try to get info about all the monitors.
|
||||||
Vector<RectI> monitorRects;
|
Vector<RectI> monitorRects;
|
||||||
pwm->getMonitorRegions(monitorRects);
|
pwm->getMonitorRegions(monitorRects);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue