1
1
#define CATCH_CONFIG_MAIN
2
- #include < catch2/catch .hpp>
2
+ #include < catch2/catch_all .hpp>
3
3
4
4
#include " mrsrc.h"
5
5
@@ -18,7 +18,8 @@ TEST_CASE("test_1", "test_1")
18
18
REQUIRE (r1.size () == 50 );
19
19
20
20
int r = std::memcmp (r1.data (), R"( This is the first line
21
- And this is the second line)" , r1.size ());
21
+ And this is the second line)" ,
22
+ r1.size ());
22
23
23
24
REQUIRE (r == 0 );
24
25
}
@@ -31,15 +32,15 @@ TEST_CASE("test_2", "test_2")
31
32
32
33
REQUIRE (r2.data () != nullptr );
33
34
REQUIRE (r2.size () == 102 );
34
- /*
35
- const char16_t* t = u"\xfeffThis is the first line\
36
- And this is the second line";
37
- // t[0] = 0xfeff;
35
+ /*
36
+ const char16_t* t = u"\xfeffThis is the first line\
37
+ And this is the second line";
38
+ // t[0] = 0xfeff;
38
39
39
- int r = std::memcmp(r2.data(), (char*)t, r2.size());
40
+ int r = std::memcmp(r2.data(), (char*)t, r2.size());
40
41
41
- REQUIRE(r == 0);
42
- */
42
+ REQUIRE(r == 0);
43
+ */
43
44
}
44
45
45
46
TEST_CASE (" test_3" , " test_3" )
@@ -74,16 +75,16 @@ TEST_CASE("test_10", "test_10")
74
75
REQUIRE (std::distance (r0.begin (), r0.end ()) == 3 );
75
76
76
77
std::set<std::string> found;
77
- for (auto & r1 : r0)
78
+ for (auto &r1 : r0)
78
79
found.insert (r1.name ());
79
80
80
- std::set<std::string> kTest {" resource-1.txt" , " resource-2.txt" , " subdir" };
81
+ std::set<std::string> kTest { " resource-1.txt" , " resource-2.txt" , " subdir" };
81
82
82
83
REQUIRE (found == kTest );
83
84
84
85
if (found != kTest )
85
86
{
86
- for (auto & f : found)
87
+ for (auto &f : found)
87
88
std::cout << f << std::endl;
88
89
}
89
90
}
@@ -132,4 +133,3 @@ TEST_CASE("test_14", "test_14")
132
133
REQUIRE ((bool )ri == false );
133
134
REQUIRE (ri.bad () == true );
134
135
}
135
-
0 commit comments