Skip to content

Commit 6477945

Browse files
committed
Revert "[YAML][NFC] precommit wrong test case (#131782)"
This reverts commit cb4ae35. That commit broke compilation with GCC: ../unittests/Support/YAMLIOTest.cpp:1280:20: error: explicit specialization of template<class T> struct llvm::yaml::MappingTraits’ outside its namespace must u se a nested-name-specifier [-fpermissive] 1280 | template <> struct MappingTraits<V> { | ^~~~~~~~~~~~~~~~
1 parent b33bec9 commit 6477945

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

llvm/unittests/Support/YAMLIOTest.cpp

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,36 +1273,6 @@ TEST(YAMLIO, TestReadWriteBlockScalarValue) {
12731273
}
12741274
}
12751275

1276-
struct V {
1277-
MultilineStringType doc;
1278-
std::string str;
1279-
};
1280-
template <> struct MappingTraits<V> {
1281-
static void mapping(IO &io, V &v) {
1282-
io.mapRequired("block_scalac", v.doc);
1283-
io.mapRequired("scalar", v.str);
1284-
}
1285-
};
1286-
template <> struct llvm::yaml::SequenceElementTraits<V> {
1287-
static const bool flow = false;
1288-
};
1289-
TEST(YAMLIO, TestScalarAfterBlockScalar) {
1290-
std::vector<V> v{V{}};
1291-
v[0].doc.str = "AA\nBB";
1292-
v[0].str = "a";
1293-
std::string output;
1294-
llvm::raw_string_ostream ostr(output);
1295-
Output yout(ostr);
1296-
yout << v;
1297-
EXPECT_EQ(output, R"(---
1298-
- block_scalac: |
1299-
AA
1300-
BB
1301-
scalar: a
1302-
...
1303-
)");
1304-
}
1305-
13061276
//===----------------------------------------------------------------------===//
13071277
// Test flow sequences
13081278
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)