Add test fixture.

This commit is contained in:
James Grogan 2022-11-29 18:00:19 +00:00
parent af6fad72eb
commit d6d4319e21
37 changed files with 421 additions and 279 deletions

View file

@ -3,30 +3,17 @@
#include "GuiApplication.h"
#include "TestFramework.h"
#include <memory>
#include <string>
#include <iostream>
class TestOpenGlRendering : public TestCase
TEST_CASE(TestOpenGlRendering, "graphics")
{
public:
bool Run() override
{
auto app = std::make_unique<GuiApplication>();
auto app = std::make_unique<GuiApplication>();
app->setUiInterfaceBackend(UiInterfaceFactory::Backend::X11);
//app->setUiInterfaceBackend(UiInterfaceFactory::Backend::X11_RASTER);
app->run();
return true;
}
app->setUiInterfaceBackend(UiInterfaceFactory::Backend::X11);
//app->setUiInterfaceBackend(UiInterfaceFactory::Backend::X11_RASTER);
app->run();
};
int main()
{
TestCaseRunner runner;
runner.AddTestCase("TestOpenGlRendering", std::make_unique<TestOpenGlRendering>());
const auto testsPassed = runner.Run();
return testsPassed ? 0 : -1;
}

View file

@ -9,7 +9,9 @@
#include "Point.h"
#include "TriMesh.h"
int main()
#include "TestFramework.h"
TEST_CASE(TestRasterizer, "graphics")
{
/*
DrawingManager manager;
@ -18,6 +20,4 @@ int main()
auto line = LineSegment::Create(Point(10.0, 10.0), Point(190.0, 190.0));
*/
return 0;
}