From 2ffb47d0043e57707474e5ae811f97c2e5e93f25 Mon Sep 17 00:00:00 2001 From: Aleksi Lindeman <0xdec05eba@gmail.com> Date: Mon, 5 Mar 2018 22:45:56 +0100 Subject: Implement 'create' operation, add seeding Seeding is currently only done on the key you specify, in the future the user should request data that it can seed. --- tests/assert.hpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/assert.hpp (limited to 'tests/assert.hpp') diff --git a/tests/assert.hpp b/tests/assert.hpp new file mode 100644 index 0000000..86f74f2 --- /dev/null +++ b/tests/assert.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include +#include + +template +static void assertEquals(const T &expected, const T &actual) +{ + if(expected != actual) + { + std::cerr << "Assertion failed!\nExpected: " << expected << ", actual: " << actual << std::endl; + exit(1); + } +} + +static void fail(const std::string &errMsg) +{ + fprintf(stderr, "Fail:\n%.*s\n", errMsg.size(), errMsg.c_str()); + exit(1); +} -- cgit v1.2.3