/
latte.hpp
39 lines (34 loc) · 964 Bytes
/
latte.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef LATTE_H
#define LATTE_H
#include "include/latte_core.hpp"
#include "include/reporter/reporter.hpp"
#include "include/style/expect.hpp"
#include <functional>
namespace latte {
latte::core::latte_before before;
latte::core::latte_before_each before_each;
latte::core::latte_after after;
latte::core::latte_after_each after_each;
latte::core::latte_describe describe(
&before,
&after,
&before_each,
&after_each);
latte::core::latte_it it(&describe);
void runner(std::function<void()> test) {
// Setup reporter
latte::reporter::latte_reporter report = latte::reporter::latte_reporter();
report();
// Begin the test
test();
};
void runner(int& argc, char** argv, std::function<void()> test) {
// TODO: Add a command line parser similar to: https://stackoverflow.com/a/868894
// Setup reporter
latte::reporter::latte_reporter report = latte::reporter::latte_reporter();
report();
// Begin the test
test();
};
} // latte
#endif