onqtam | 862a3bb | 2016-04-27 18:19:00 +0300 | [diff] [blame] | 1 | //#define DOCTEST_CONFIG_DISABLE
|
hardly | b1e7e14 | 2014-08-06 00:43:51 +0300 | [diff] [blame] | 2 |
|
onqtam | cae7312 | 2016-04-29 14:57:23 +0300 | [diff] [blame] | 3 | #include "doctest.h"
|
onqtam | 862a3bb | 2016-04-27 18:19:00 +0300 | [diff] [blame] | 4 | #define DOCTEST_CONFIG_IMPLEMENT
|
hardly | b1e7e14 | 2014-08-06 00:43:51 +0300 | [diff] [blame] | 5 | #include "doctest.h"
|
| 6 |
|
| 7 | #include <cstdio>
|
onqtam | cae7312 | 2016-04-29 14:57:23 +0300 | [diff] [blame] | 8 | #include <cstdlib>
|
onqtam | 4286919 | 2016-05-15 19:06:24 +0300 | [diff] [blame] | 9 | #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 | //}
|
onqtam | e08cd40 | 2016-05-16 19:18:25 +0300 | [diff] [blame^] | 22 |
|
| 23 | TEST_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 | }
|
hardly | b1e7e14 | 2014-08-06 00:43:51 +0300 | [diff] [blame] | 38 |
|
| 39 | int main(int argc, char** argv) {
|
| 40 | // initialize
|
| 41 | doctest::Context context(argc, argv);
|
hardly | b1e7e14 | 2014-08-06 00:43:51 +0300 | [diff] [blame] | 42 |
|
| 43 | // overrides
|
| 44 | context.setOption("dt-case-sensitive", true);
|
onqtam | 862a3bb | 2016-04-27 18:19:00 +0300 | [diff] [blame] | 45 | context.setOption("no-breaks", true);
|
onqtam | 7049f40 | 2016-05-12 23:58:59 +0300 | [diff] [blame] | 46 | //context.setOption("success", true);
|
onqtam | ad0d6d2 | 2016-05-11 17:46:02 +0300 | [diff] [blame] | 47 | //context.setOption("no-throw", true);
|
onqtam | 0cea9bc | 2016-04-27 12:59:08 +0300 | [diff] [blame] | 48 | //context.setOption("dt-no-colors", true);
|
onqtam | ad0d6d2 | 2016-05-11 17:46:02 +0300 | [diff] [blame] | 49 | context.addFilter("name", "zzz");
|
onqtam | 3af136c | 2016-05-12 18:05:18 +0300 | [diff] [blame] | 50 | //context.setOption("abort-after", 1);
|
onqtam | 76c1364 | 2016-05-11 17:30:29 +0300 | [diff] [blame] | 51 | //context.addFilter("suite", "randomness");
|
| 52 | //context.setOption("sort", "rand");
|
| 53 | //context.setOption("rand-seed", 435);
|
hardly | b1e7e14 | 2014-08-06 00:43:51 +0300 | [diff] [blame] | 54 |
|
| 55 | // run
|
onqtam | b91b68e | 2016-05-04 20:16:19 +0300 | [diff] [blame] | 56 | int res = context.run();
|
| 57 |
|
| 58 | if(context.shouldExit())
|
| 59 | return res;
|
hardly | b1e7e14 | 2014-08-06 00:43:51 +0300 | [diff] [blame] | 60 |
|
| 61 | #if defined(WITH_PAUSE)
|
| 62 | system("pause");
|
onqtam | 8ccce3b | 2016-04-20 20:46:05 +0300 | [diff] [blame] | 63 | #endif // WITH_PAUSE
|
hardly | b1e7e14 | 2014-08-06 00:43:51 +0300 | [diff] [blame] | 64 |
|
| 65 | return res;
|
| 66 | }
|