Home | History | Annotate | Download | only in test

Lines Matching defs:Test

46     struct Test
54 const list<Test> tests = {{{}, nullptr, 21, 21, 0},
59 for (auto &test : tests) {
60 CAPTURE(Catch::toString(test.input));
61 const auto &first = begin(test.input);
62 const auto &last = end(test.input);
63 REQUIRE(join(first, last, test.binaryOpt, test.empty) == test.result);
64 REQUIRE(join<int>(first, last, test.binaryOpt) == test.resultNoEmpty);
70 struct Test
78 const list<Test> tests = {
85 for (auto &test : tests) {
86 CAPTURE(Catch::toString(test.input));
87 WHEN ("Separator, " + test.title) {
88 CAPTURE(test.separator);
89 REQUIRE(asString(test.input, test.separator) == test.result);
91 THEN ("No separator, " + test.title) {
92 REQUIRE(asString(test.input) == test.resultNoSep);
102 struct Test
111 const list<Test> tests = {{{}, "itemSep", "keyValueSep", "", "", ""},
119 for (const auto &test : tests) {
120 CAPTURE(Catch::toString(test.input));
121 CAPTURE(test.keyValueSep);
122 CAPTURE(test.itemSep);
123 REQUIRE(asString(test.input, test.keyValueSep, test.itemSep) == test.result);
124 REQUIRE(asString(test.input, test.keyValueSep) == test.resultNoKeyValueSep);
125 REQUIRE(asString(test.input) == test.resultNoSep);
131 struct Test
137 const list<Test> tests = {{"", "abc", "\nabc\n===\n"},
139 for (auto &test : tests) {
142 GIVEN ("A title: " + quote(test.title)) {
143 CAPTURE(test.initial);
144 CAPTURE(test.title);
146 WHEN ("Appending to: " + quote(test.initial)) {
147 string output = test.initial;
148 THEN ("Result should be:\n" + quote(test.result)) {
149 appendTitle(output, test.title);
150 CHECK(output == test.result);