blob: 8ca42e533819b86b1ba943eba845683d1a0fcf2d [file] [log] [blame]
onqtam862a3bb2016-04-27 18:19:00 +03001//#define DOCTEST_CONFIG_DISABLE
hardlyb1e7e142014-08-06 00:43:51 +03002
onqtamcae73122016-04-29 14:57:23 +03003#include "doctest.h"
onqtam862a3bb2016-04-27 18:19:00 +03004#define DOCTEST_CONFIG_IMPLEMENT
hardlyb1e7e142014-08-06 00:43:51 +03005#include "doctest.h"
6
7#include <cstdio>
onqtamcae73122016-04-29 14:57:23 +03008#include <cstdlib>
onqtam42869192016-05-15 19:06:24 +03009#include <vector>
10
11//template <typename T>
12//std::ostream& operator<<(std::ostream& s, const std::vector<T>& in) {
13// s << "[";
14// for(size_t i = 0; i < in.size(); ++i)
15// if(i < in.size() - 1)
16// s << in[i] << ", ";
17// else
18// s << in[i];
19// s << "]";
20// return s;
21//}
onqtame08cd402016-05-16 19:18:25 +030022
23TEST_CASE("zzz") {
24 //CHECK(std::string("OMG2") == std::string("OMG"));
25
26 std::vector<int> vec1;
27 vec1.push_back(1);
28 vec1.push_back(2);
29 vec1.push_back(3);
30
31 std::vector<int> vec2;
32 vec2.push_back(1);
33 vec2.push_back(2);
34 vec2.push_back(4);
35
36 CHECK(vec1 == vec2);
37}
hardlyb1e7e142014-08-06 00:43:51 +030038
39int main(int argc, char** argv) {
40 // initialize
41 doctest::Context context(argc, argv);
hardlyb1e7e142014-08-06 00:43:51 +030042
43 // overrides
44 context.setOption("dt-case-sensitive", true);
onqtam862a3bb2016-04-27 18:19:00 +030045 context.setOption("no-breaks", true);
onqtam7049f402016-05-12 23:58:59 +030046 //context.setOption("success", true);
onqtamad0d6d22016-05-11 17:46:02 +030047 //context.setOption("no-throw", true);
onqtam0cea9bc2016-04-27 12:59:08 +030048 //context.setOption("dt-no-colors", true);
onqtamad0d6d22016-05-11 17:46:02 +030049 context.addFilter("name", "zzz");
onqtam3af136c2016-05-12 18:05:18 +030050 //context.setOption("abort-after", 1);
onqtam76c13642016-05-11 17:30:29 +030051 //context.addFilter("suite", "randomness");
52 //context.setOption("sort", "rand");
53 //context.setOption("rand-seed", 435);
hardlyb1e7e142014-08-06 00:43:51 +030054
55 // run
onqtamb91b68e2016-05-04 20:16:19 +030056 int res = context.run();
57
58 if(context.shouldExit())
59 return res;
hardlyb1e7e142014-08-06 00:43:51 +030060
61#if defined(WITH_PAUSE)
62 system("pause");
onqtam8ccce3b2016-04-20 20:46:05 +030063#endif // WITH_PAUSE
hardlyb1e7e142014-08-06 00:43:51 +030064
65 return res;
66}