opensurgsim
Namespaces | Functions
ViewTests.cpp File Reference

Tests for the View class. More...

#include "SurgSim/Graphics/UnitTests/MockObjects.h"
#include "SurgSim/Graphics/OsgCamera.h"
#include <gtest/gtest.h>
#include <random>

Namespaces

 SurgSim
 Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui needs glew but we need to call glewInit() from a osg callback, using this call we avoid getting warnings about redefinitions.
 

Functions

 SurgSim::Graphics::TEST (ViewTests, InitTest)
 
 SurgSim::Graphics::TEST (ViewTests, NameTest)
 
 SurgSim::Graphics::TEST (ViewTests, WindowSettingsTests)
 
 SurgSim::Graphics::TEST (ViewTests, CameraTest)
 
 SurgSim::Graphics::TEST (ViewTests, UpdateTest)
 

Detailed Description

Tests for the View class.

Function Documentation

§ TEST() [1/3]

SurgSim::Graphics::TEST ( ViewTests  ,
WindowSettingsTests   
)

Set position and check that it set correctly

Set dimensions and check that it set correctly

The window border should be enabled initially

Disable the window border

§ TEST() [2/3]

SurgSim::Graphics::TEST ( ViewTests  ,
CameraTest   
)

Set the camera and check that it set correctly

§ TEST() [3/3]

SurgSim::Graphics::TEST ( ViewTests  ,
UpdateTest   
)

Do 10 updates with random dt and check each time that the number of updates and sum of dt are correct.