Added testing with doctest

This commit is contained in:
matthias@arch 2023-02-01 21:29:33 +01:00
parent 742e608e01
commit 9687a335ce
2 changed files with 29 additions and 0 deletions

18
src/gz-util.hpp Normal file
View File

@ -0,0 +1,18 @@
#pragma once
/**
* @file
* @brief Includes all headers from this library
* @details
* Not recommended - this is mainly used for testing the library.
*/
#include "settings_manager.hpp"
#include "log.hpp"
#include "string/conversion.hpp"
#include "string/utility.hpp"
#include "regex.hpp"
#include "concepts.hpp"
#include "container/queue.hpp"
#include "container/ringbuffer.hpp"

11
src/testing.cpp Normal file
View File

@ -0,0 +1,11 @@
#ifdef GZ_UTIL_TESTING
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include <doctest/doctest.h>
#include "gz-util.hpp"
#endif
/**
* @file
* @brief Includes all headers and implements `main` for testing
*/