From 65be8090d3a969dda446239cf2e014c0191e5860 Mon Sep 17 00:00:00 2001 From: "David J. Allen" Date: Wed, 4 Jan 2023 20:55:11 -0600 Subject: [PATCH] Add `basic.cpp` test file --- tests/basic.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/basic.cpp diff --git a/tests/basic.cpp b/tests/basic.cpp new file mode 100644 index 0000000..fd7fdb2 --- /dev/null +++ b/tests/basic.cpp @@ -0,0 +1,29 @@ +#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN + +#include "log.hpp" +#include "cache.hpp" +#include "config.hpp" + +#include + + + +TEST_CASE("Confirm doctest unit testing"){ + CHECK(true); + gdpm::log::print("Testing doctest"); +} + + +TEST_CASE("Test cache database functions"){ + gdpm::cache::create_package_database() +} + + +TEST_CASE("Test configuration functions"){ + gdpm::config::context config; + config.path = gdpm::constants::TestPath + "/"; + + std::string json = gdpm::config::to_json(config); + int status = gdpm::config::save(config); + gdpm::config::context new_config = gdpm::config::load(config.path, config) +} \ No newline at end of file