Lines Matching +full:end +full:- +full:of +full:- +full:stream
1 //===- unittest/Support/YAMLParserTest ------------------------------------===//
5 // This file is distributed under the University of Illinois Open Source
8 //===----------------------------------------------------------------------===//
34 yaml::Stream Stream(Input, SM); in ExpectParseError() local
36 EXPECT_FALSE(Stream.validate()) << Message << ": " << Input; in ExpectParseError()
37 EXPECT_TRUE(Stream.failed()) << Message << ": " << Input; in ExpectParseError()
43 yaml::Stream Stream(Input, SM); in ExpectParseSuccess() local
44 EXPECT_TRUE(Stream.validate()) << Message << ": " << Input; in ExpectParseSuccess()
129 ExpectParseSuccess("Array of arrays", "[[]]"); in TEST()
137 ExpectParseSuccess("Empty block literal scalar 2", "- | \n \n\n \n- 42"); in TEST()
139 "- |\n Testing\n Out\n\n- 22"); in TEST()
141 "--- |\n Document\n..."); in TEST()
143 "- |\n First line\n \n\n Another line\n\n- 2"); in TEST()
147 "test: |- \n Hello\n\ntest 2: |+ \n\n World\n\n\n"); in TEST()
151 "test: |-1\n Hello\ntest 2: |9+\n World"); in TEST()
161 yaml::Stream Stream("test: |\n Hello\n World\n", SM); in TEST() local
162 yaml::Document &Doc = *Stream.begin(); in TEST()
165 cast<yaml::BlockScalarNode>(Map->begin()->getValue())->getValue(); in TEST()
187 // of an array.
191 yaml::Stream Stream(StringInArray, SM); in ExpectCanParseString() local
193 = dyn_cast<yaml::SequenceNode>(Stream.begin()->getRoot()); in ExpectCanParseString()
196 static_cast<yaml::Node*>(ParsedSequence->begin()))->getRawValue(); in ExpectCanParseString()
197 ParsedString = ParsedString.substr(1, ParsedString.size() - 2); in ExpectCanParseString()
228 yaml::Stream Stream("[\"1\", \"2\", \"3\", \"4\", \"5\", \"6\"]", SM); in TEST() local
230 = dyn_cast<yaml::SequenceNode>(Stream.begin()->getRoot()); in TEST()
231 EXPECT_EQ(6, std::distance(Array->begin(), Array->end())); in TEST()
240 // When we construct a YAML stream over an unnamed string, in TEST()
241 // the filename is hard-coded as "YAML". in TEST()
242 yaml::Stream UnnamedStream("[]", SM); in TEST()
243 UnnamedStream.printError(UnnamedStream.begin()->getRoot(), "Hello, World!"); in TEST()
253 // When we construct a YAML stream over a named buffer, in TEST()
257 yaml::Stream Stream(Buffer->getMemBufferRef(), SM); in TEST() local
258 Stream.printError(Stream.begin()->getRoot(), "Hello, World!"); in TEST()
264 yaml::Stream Stream("[\"1\", \"2\"]", SM); in TEST() local
267 Stream.begin()->getRoot()); in TEST()
269 auto Begin = Node->begin(); in TEST()
270 auto End = Node->end(); in TEST() local
272 EXPECT_TRUE(Begin != End); in TEST()
274 EXPECT_FALSE(End != End); in TEST()
279 yaml::Stream Stream("[\"1\", \"2\"]", SM); in TEST() local
282 Stream.begin()->getRoot()); in TEST()
284 auto Begin = Node->begin(); in TEST()
285 auto End = Node->end(); in TEST() local
287 EXPECT_FALSE(Begin == End); in TEST()
289 EXPECT_TRUE(End == End); in TEST()
294 yaml::Stream Stream("[\"1\", \"2\"]", SM); in TEST() local
295 yaml::Stream AnotherStream("[\"1\", \"2\"]", SM); in TEST()
298 Stream.begin()->getRoot()); in TEST()
300 AnotherStream.begin()->getRoot()); in TEST()
302 auto Begin = Node->begin(); in TEST()
303 auto End = Node->end(); in TEST() local
305 auto AnotherBegin = AnotherNode->begin(); in TEST()
306 auto AnotherEnd = AnotherNode->end(); in TEST()
310 EXPECT_FALSE(End != AnotherEnd); in TEST()
315 yaml::Stream Stream("[\"1\", \"2\"]", SM); in TEST() local
316 yaml::Stream AnotherStream("[\"1\", \"2\"]", SM); in TEST()
319 Stream.begin()->getRoot()); in TEST()
321 AnotherStream.begin()->getRoot()); in TEST()
323 auto Begin = Node->begin(); in TEST()
324 auto End = Node->end(); in TEST() local
326 auto AnotherBegin = AnotherNode->begin(); in TEST()
327 auto AnotherEnd = AnotherNode->end(); in TEST()
331 EXPECT_TRUE(End == AnotherEnd); in TEST()
334 } // end namespace llvm