Initial Commit
This commit is contained in:
5
tests/CMakeLists.txt
Normal file
5
tests/CMakeLists.txt
Normal 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
17698
tests/catch.hpp
Normal file
File diff suppressed because it is too large
Load Diff
9
tests/int_basic.cpp
Normal file
9
tests/int_basic.cpp
Normal 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
13
tests/main.cpp
Normal 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
14
tests/unit_dag.cpp
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user