From d722a83f43c558b26deb3a2dce1e66ddce1bbd7e Mon Sep 17 00:00:00 2001 From: jmacey Date: Wed, 27 Sep 2023 08:05:48 +0100 Subject: [PATCH] added message tests --- CMakeLists.txt | 2 ++ tests/MessageTests.cpp | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 tests/MessageTests.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 37016eb6..0b7ae234 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -257,6 +257,8 @@ if(NOT DEFINED PYNGL_ONLY) ${CMAKE_SOURCE_DIR}/tests/ImageTests.cpp ${CMAKE_SOURCE_DIR}/tests/HashTests.cpp ${CMAKE_SOURCE_DIR}/tests/PointBakeTests.cpp + ${CMAKE_SOURCE_DIR}/tests/MessageTests.cpp + ) add_compile_definitions(GLM_ENABLE_EXPERIMENTAL) diff --git a/tests/MessageTests.cpp b/tests/MessageTests.cpp new file mode 100644 index 00000000..b2edbfe9 --- /dev/null +++ b/tests/MessageTests.cpp @@ -0,0 +1,35 @@ +#include +#include +#include +#include +#include + + + +TEST(NGLMessage,addMessage) +{ + ngl::NGLMessage::addMessage("Message"); + ngl::NGLMessage::addWarning("Warning"); + ngl::NGLMessage::addError("Error"); + ngl::NGLMessage::drawLine(); +} + +TEST(NGLMessage,colours) +{ + ngl::NGLMessage::drawLine(ngl::Colours::RED); + ngl::NGLMessage::drawLine(ngl::Colours::GREEN); + ngl::NGLMessage::drawLine(ngl::Colours::YELLOW); + ngl::NGLMessage::drawLine(ngl::Colours::BLUE); + ngl::NGLMessage::drawLine(ngl::Colours::MAGENTA); + ngl::NGLMessage::drawLine(ngl::Colours::CYAN); + ngl::NGLMessage::drawLine(ngl::Colours::WHITE); + ngl::NGLMessage::drawLine(ngl::Colours::RESET); +} + +TEST(NGLMessage,timeformats) +{ + ngl::NGLMessage::addMessage("None",ngl::Colours::RED,ngl::TimeFormat::NONE); + ngl::NGLMessage::addMessage("Time",ngl::Colours::RED,ngl::TimeFormat::TIME); + ngl::NGLMessage::addMessage("Time Data",ngl::Colours::RED,ngl::TimeFormat::TIMEDATE); + ngl::NGLMessage::addMessage("Time Date Day",ngl::Colours::RED,ngl::TimeFormat::TIMEDATEDAY); +}