From 3c1c392ab177566f09d11a380210e1937741fad2 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 28 May 2023 11:45:01 +0100 Subject: Swap GLEW for more modern glad --- test/Jamfile.jam | 4 ++-- test/test-glContextBhvr.cpp | 4 ++-- test/test-lib.cpp | 2 +- test/test-network.cpp | 5 +++++ test/test-text.cpp | 5 +++++ 5 files changed, 15 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/Jamfile.jam b/test/Jamfile.jam index 3b4e891..e221af7 100644 --- a/test/Jamfile.jam +++ b/test/Jamfile.jam @@ -47,9 +47,9 @@ run test-collection.cpp ; run test-maths.cpp ; run test-lib.cpp ; run test-geo.cpp ; -run test-network.cpp ; +run test-network.cpp : : : test ; run test-persistence.cpp : -- : [ sequence.insertion-sort [ glob-tree fixtures : *.json ] ] : test ; -run test-text.cpp ; +run test-text.cpp : : : test ; run test-enumDetails.cpp ; run test-render.cpp : -- : test-assetFactory : test ; run test-glContextBhvr.cpp ; diff --git a/test/test-glContextBhvr.cpp b/test/test-glContextBhvr.cpp index 9716f54..1f1215c 100644 --- a/test/test-glContextBhvr.cpp +++ b/test/test-glContextBhvr.cpp @@ -24,12 +24,12 @@ BOOST_AUTO_TEST_CASE(windowContextThingsBehaviour1) const SDL_WindowPtr window {TEST_WINDOW_PARAMS}; BOOST_REQUIRE(window); BOOST_REQUIRE(!glCreateProgram); - BOOST_REQUIRE_NE(glewInit(), GLEW_OK); // No context yet + BOOST_REQUIRE_EQUAL(gladLoadGL(reinterpret_cast(SDL_GL_GetProcAddress)), 0); // No context yet { const SDL_GLContextPtr context {window}; BOOST_REQUIRE(context); BOOST_REQUIRE(!glCreateProgram); - BOOST_REQUIRE_EQUAL(glewInit(), GLEW_OK); + BOOST_REQUIRE_EQUAL(gladLoadGL(reinterpret_cast(SDL_GL_GetProcAddress)), 40006); BOOST_REQUIRE(glCreateProgram); CreateProgramTest(); } // Context destroyed diff --git a/test/test-lib.cpp b/test/test-lib.cpp index 73ed53a..aaf6292 100644 --- a/test/test-lib.cpp +++ b/test/test-lib.cpp @@ -4,8 +4,8 @@ #include #include -#include #include +#include #include std::set active; diff --git a/test/test-network.cpp b/test/test-network.cpp index e6241e4..a8db2b6 100644 --- a/test/test-network.cpp +++ b/test/test-network.cpp @@ -4,6 +4,8 @@ #include #include +#include "testMainWindow.h" +#include "ui/applicationBase.h" #include #include #include @@ -18,6 +20,9 @@ #include #include +BOOST_GLOBAL_FIXTURE(ApplicationBase); +BOOST_GLOBAL_FIXTURE(TestMainWindow); + struct TestLink : public LinkStraight { TestLink(const Node::Ptr & a, const Node::Ptr & b) : TestLink {a, b, (a->pos - b->pos)} { } TestLink(Node::Ptr a, Node::Ptr b, glm::vec2 l) : Link {{std::move(a), 0}, {std::move(b), pi}, glm::length(l)} { } diff --git a/test/test-text.cpp b/test/test-text.cpp index 3a23818..629892f 100644 --- a/test/test-text.cpp +++ b/test/test-text.cpp @@ -5,6 +5,8 @@ #include #include +#include "testMainWindow.h" +#include "ui/applicationBase.h" #include #include #include @@ -12,6 +14,9 @@ #include #include +BOOST_GLOBAL_FIXTURE(ApplicationBase); +BOOST_GLOBAL_FIXTURE(TestMainWindow); + BOOST_AUTO_TEST_CASE(utf8_string_view_iter) { static constexpr utf8_string_view text {"Some UTF-8 €£²¹ text."}; -- cgit v1.2.3