diff options
| author | Alex Lorenz <arphaman@gmail.com> | 2015-06-17 23:48:06 +0000 |
|---|---|---|
| committer | Alex Lorenz <arphaman@gmail.com> | 2015-06-17 23:48:06 +0000 |
| commit | 29c5edcdec764fbf67ae852bddcbd57c35e99769 (patch) | |
| tree | 90827ba5febd34e3b5a830dd96aba2f781f3c811 /llvm/unittests/Support/YAMLIOTest.cpp | |
| parent | 73404c3c89c802afba2ec436654844005a4980d8 (diff) | |
| download | bcm5719-llvm-29c5edcdec764fbf67ae852bddcbd57c35e99769.tar.gz bcm5719-llvm-29c5edcdec764fbf67ae852bddcbd57c35e99769.zip | |
Revert r239972 (YAML: Assign a value returned by the default constructor to the value in an optional mapping).
This change breaks clang-format tests.
llvm-svn: 239976
Diffstat (limited to 'llvm/unittests/Support/YAMLIOTest.cpp')
| -rw-r--r-- | llvm/unittests/Support/YAMLIOTest.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/llvm/unittests/Support/YAMLIOTest.cpp b/llvm/unittests/Support/YAMLIOTest.cpp index 0c791b7a020..e7affa1698d 100644 --- a/llvm/unittests/Support/YAMLIOTest.cpp +++ b/llvm/unittests/Support/YAMLIOTest.cpp @@ -68,21 +68,6 @@ namespace yaml { } } -struct FooBarOptional { - int Foo; - int Bar; -}; - -namespace llvm { -namespace yaml { -template <> struct MappingTraits<FooBarOptional> { - static void mapping(IO &YamlIO, FooBarOptional &Obj) { - YamlIO.mapRequired("foo", Obj.Foo); - YamlIO.mapOptional("bar", Obj.Bar); - } -}; -} -} // // Test the reading of a yaml mapping @@ -108,19 +93,6 @@ TEST(YAMLIO, TestMapRead) { } } -TEST(YAMLIO, TestMapReadOptional) { - FooBarOptional Doc; - Doc.Bar = 42; - { - Input In("---\nfoo: 3\n...\n"); - In >> Doc; - - EXPECT_FALSE(In.error()); - EXPECT_EQ(Doc.Foo, 3); - EXPECT_EQ(Doc.Bar, 0); - } -} - TEST(YAMLIO, TestMalformedMapRead) { FooBar doc; Input yin("{foo: 3; bar: 5}", nullptr, suppressErrorMessages); |

