From 455fcf0bb13baa18eac12d265ebdb743cb8815f3 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Thu, 5 Jan 2023 14:32:48 +0100 Subject: Added tests (WIP) --- tests/Makefile | 15 +++++++++++---- tests/test-archive.cpp | 28 ++++++++++++++++++++++++++++ tests/test-auth.cpp | 28 ++++++++++++++++++++++++++++ tests/test-config.cpp | 28 ++++++++++++++++++++++++++++ tests/test-http.cpp | 28 ++++++++++++++++++++++++++++ tests/test-https.cpp | 28 ++++++++++++++++++++++++++++ tests/test-plugin.cpp | 28 ++++++++++++++++++++++++++++ tests/test-privileges.cpp | 28 ++++++++++++++++++++++++++++ tests/test-response.cpp | 28 ++++++++++++++++++++++++++++ tests/test-server.cpp | 28 ++++++++++++++++++++++++++++ tests/test-statistics.cpp | 28 ++++++++++++++++++++++++++++ 11 files changed, 291 insertions(+), 4 deletions(-) create mode 100644 tests/test-archive.cpp create mode 100644 tests/test-auth.cpp create mode 100644 tests/test-config.cpp create mode 100644 tests/test-http.cpp create mode 100644 tests/test-https.cpp create mode 100644 tests/test-plugin.cpp create mode 100644 tests/test-privileges.cpp create mode 100644 tests/test-response.cpp create mode 100644 tests/test-server.cpp create mode 100644 tests/test-statistics.cpp diff --git a/tests/Makefile b/tests/Makefile index 4522952..00c50a1 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -44,8 +44,19 @@ UNITS=\ webserver.cpp TESTSRC=\ + test-archive.cpp \ + test-auth.cpp \ + test-config.cpp \ test-environment.cpp \ + test-http.cpp \ + test-https.cpp \ + test-plugin.cpp \ + test-privileges.cpp \ + test-response.cpp \ + test-server.cpp \ + test-statistics.cpp \ test-webserver.cpp \ + $(PROGSRC) build: $(PROJECTNAME) @@ -71,16 +82,12 @@ dep: $(TESTSRC:.cpp=.d) auth.o: ../auth.cpp $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@ -base64.o: ../base64.cpp - $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@ config.o: ../config.cpp $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@ http.o: ../http.cpp $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@ https.o: ../https.cpp $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@ -os.o: ../os.cpp - $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@ plugin.o: ../plugin.cpp $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@ privileges.o: ../privileges.cpp diff --git a/tests/test-archive.cpp b/tests/test-archive.cpp new file mode 100644 index 0000000..e6b5894 --- /dev/null +++ b/tests/test-archive.cpp @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "archive.h" + +using namespace std::string_literals; + +class ArchiveFixture +{ +public: + ArchiveFixture(){} + ~ArchiveFixture(){} + void setup(){} + void teardown(){} +}; + +BOOST_FIXTURE_TEST_CASE(archivetest, ArchiveFixture) +{ +} + diff --git a/tests/test-auth.cpp b/tests/test-auth.cpp new file mode 100644 index 0000000..7948a0a --- /dev/null +++ b/tests/test-auth.cpp @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "auth.h" + +using namespace std::string_literals; + +class AuthFixture +{ +public: + AuthFixture(){} + ~AuthFixture(){} + void setup(){} + void teardown(){} +}; + +BOOST_FIXTURE_TEST_CASE(auth, AuthFixture) +{ +} + diff --git a/tests/test-config.cpp b/tests/test-config.cpp new file mode 100644 index 0000000..ddba9c9 --- /dev/null +++ b/tests/test-config.cpp @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "config.h" + +using namespace std::string_literals; + +class ConfigFixture +{ +public: + ConfigFixture(){} + ~ConfigFixture(){} + void setup(){} + void teardown(){} +}; + +BOOST_FIXTURE_TEST_CASE(config, ConfigFixture) +{ +} + diff --git a/tests/test-http.cpp b/tests/test-http.cpp new file mode 100644 index 0000000..2763097 --- /dev/null +++ b/tests/test-http.cpp @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "http.h" + +using namespace std::string_literals; + +class HTTPFixture +{ +public: + HTTPFixture(){} + ~HTTPFixture(){} + void setup(){} + void teardown(){} +}; + +BOOST_FIXTURE_TEST_CASE(http, HTTPFixture) +{ +} + diff --git a/tests/test-https.cpp b/tests/test-https.cpp new file mode 100644 index 0000000..dcd33d7 --- /dev/null +++ b/tests/test-https.cpp @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "archive.h" + +using namespace std::string_literals; + +class HTTPSFixture +{ +public: + HTTPSFixture(){} + ~HTTPSFixture(){} + void setup(){} + void teardown(){} +}; + +BOOST_FIXTURE_TEST_CASE(https, HTTPSFixture) +{ +} + diff --git a/tests/test-plugin.cpp b/tests/test-plugin.cpp new file mode 100644 index 0000000..d908bc7 --- /dev/null +++ b/tests/test-plugin.cpp @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "plugin.h" + +using namespace std::string_literals; + +class PluginFixture +{ +public: + PluginFixture(){} + ~PluginFixture(){} + void setup(){} + void teardown(){} +}; + +BOOST_FIXTURE_TEST_CASE(plugin, PluginFixture) +{ +} + diff --git a/tests/test-privileges.cpp b/tests/test-privileges.cpp new file mode 100644 index 0000000..51500ea --- /dev/null +++ b/tests/test-privileges.cpp @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "privileges.h" + +using namespace std::string_literals; + +class PrivilegesFixture +{ +public: + PrivilegesFixture(){} + ~PrivilegesFixture(){} + void setup(){} + void teardown(){} +}; + +BOOST_FIXTURE_TEST_CASE(privileges, PrivilegesFixture) +{ +} + diff --git a/tests/test-response.cpp b/tests/test-response.cpp new file mode 100644 index 0000000..3f83a6d --- /dev/null +++ b/tests/test-response.cpp @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "response.h" + +using namespace std::string_literals; + +class ResponseFixture +{ +public: + ResponseFixture(){} + ~ResponseFixture(){} + void setup(){} + void teardown(){} +}; + +BOOST_FIXTURE_TEST_CASE(response, ResponseFixture) +{ +} + diff --git a/tests/test-server.cpp b/tests/test-server.cpp new file mode 100644 index 0000000..b042be4 --- /dev/null +++ b/tests/test-server.cpp @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "server.h" + +using namespace std::string_literals; + +class ServerFixture +{ +public: + ServerFixture(){} + ~ServerFixture(){} + void setup(){} + void teardown(){} +}; + +BOOST_FIXTURE_TEST_CASE(server, ServerFixture) +{ +} + diff --git a/tests/test-statistics.cpp b/tests/test-statistics.cpp new file mode 100644 index 0000000..9ed7d06 --- /dev/null +++ b/tests/test-statistics.cpp @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "statistics.h" + +using namespace std::string_literals; + +class StatisticsFixture +{ +public: + StatisticsFixture(){} + ~StatisticsFixture(){} + void setup(){} + void teardown(){} +}; + +BOOST_FIXTURE_TEST_CASE(statistics, StatisticsFixture) +{ +} + -- cgit v1.2.3