Initial Commit
This commit is contained in:
@@ -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
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "daggy/DAG.hpp"
|
||||
|
||||
#include "catch.hpp"
|
||||
|
||||
TEST_CASE("General tests", "[general]") {
|
||||
REQUIRE(1 == 1);
|
||||
}
|
||||
@@ -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
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user