Skip to content

Commit

Permalink
added message tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacey committed Sep 27, 2023
1 parent 3f0f235 commit d722a83
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
35 changes: 35 additions & 0 deletions tests/MessageTests.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#include <gtest/gtest.h>
#include <array>
#include <string>
#include <thread>
#include <ngl/NGLMessage.h>



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);
}

0 comments on commit d722a83

Please sign in to comment.