Skip to content
Snippets Groups Projects
Commit ad0ef9ac authored by Sebastian Staffa's avatar Sebastian Staffa
Browse files

Add test infrastructure

parent faf1d371
No related branches found
No related tags found
No related merge requests found
......@@ -2,3 +2,4 @@ test/out/
fuzz_main
main
result
tests
......@@ -17,3 +17,9 @@ fuzz: fuzz_main
clean:
rm -rf bin test/out
rm -rf main fuzz_main out
tests: test/main.test.cpp
mkdir -p bin
$(CXX) $(CXXFLAGS) -o bin/tests test/main.test.cpp
main.h 0 → 100644
#ifndef __MAIN__GUARD__
#define __MAIN__GUARD__
int add(int a, int b);
int subtract(int a, int b);
int multiply(int a, int b);
int divide(int a, int b);
int evaluate(const std::string &s);
#endif
......@@ -5,6 +5,7 @@
#include <climits>
#include <unordered_map>
#include <iterator>
#include "main.h"
/*
* Adds two integers
......
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include "./../main.h"
TEST_CASE("Trivial test","[trivial]") {
REQUIRE(true);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment