mirror of
https://github.com/davidallendj/gdpm.git
synced 2025-12-19 19:17:01 -07:00
Add basic.cpp test file
This commit is contained in:
parent
e048a762b2
commit
65be8090d3
1 changed files with 29 additions and 0 deletions
29
tests/basic.cpp
Normal file
29
tests/basic.cpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
|
||||
|
||||
#include "log.hpp"
|
||||
#include "cache.hpp"
|
||||
#include "config.hpp"
|
||||
|
||||
#include <doctest.h>
|
||||
|
||||
|
||||
|
||||
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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue