Initial commit

This commit is contained in:
Bartek Kryza
2021-02-07 23:13:52 +01:00
commit 8ccd4bc81e
26 changed files with 27626 additions and 0 deletions

19
tests/test_example.cpp Normal file
View File

@@ -0,0 +1,19 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include <source_file.hpp>
#include <string>
#include <complex>
TEST_CASE("Test add", "[unit-test]"){
// not very good tests, but oh well...
REQUIRE(add(2, 3) == 5);
REQUIRE(add(2., 3.) == 5.);
REQUIRE(add(0, 0) == 0);
std::cout << "RUNNING TEST" << std::endl;
std::complex<double> a(2., 3.);
std::complex<double> b(-1., 20.);
std::complex<double> c(1., 23.);
REQUIRE(add(a,b) == c);
}