Initial Commit

This commit is contained in:
Ian Roddis
2021-06-02 10:38:57 -03:00
commit e64361c864
10 changed files with 17815 additions and 0 deletions

5
tests/CMakeLists.txt Normal file
View File

@@ -0,0 +1,5 @@
project(tests)
file(GLOB UNIT_TESTS unit_*.cpp)
file(GLOB INTEGRATION_TESTS int_*.cpp)
add_executable(tests main.cpp ${UNIT_TESTS} ${INTEGRATION_TESTS})
target_link_libraries(tests daggy)

17698
tests/catch.hpp Normal file

File diff suppressed because it is too large Load Diff

9
tests/int_basic.cpp Normal file
View File

@@ -0,0 +1,9 @@
#include <iostream>
#include "daggy/DAG.hpp"
#include "catch.hpp"
TEST_CASE("General tests", "[general]") {
REQUIRE(1 == 1);
}

13
tests/main.cpp Normal file
View File

@@ -0,0 +1,13 @@
#include <iostream>
#include "daggy/DAG.hpp"
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
TEST_CASE("Sanity tests", "[sanity]") {
REQUIRE(1 == 1);
}
// compile and run
// g++ -std=c++17 -o test test.cpp && ./test

14
tests/unit_dag.cpp Normal file
View File

@@ -0,0 +1,14 @@
#include <iostream>
#include "daggy/DAG.hpp"
#include "catch.hpp"
TEST_CASE("DAG Basic Tests", "[dag]") {
daggy::DAG<int, std::string> dag;
dag.addVertex(0, "hello");
dag.addVertex(1, "goodbye");
dag.addEdge(0, 1);
}