• Home
  • Raw
  • Download

Lines Matching refs:stream

61 			ITreeNodeStream stream = CreateCommonTreeNodeStream(t);  in testSingleNode()
63 string actual = GetStringOfEntireStreamContentsWithNodeTypesOnly(stream); in testSingleNode()
67 actual = stream.ToString(); in testSingleNode()
82 ITreeNodeStream stream = CreateBufferedTreeNodeStream(t); in test4Nodes()
84 string actual = GetStringOfEntireStreamContentsWithNodeTypesOnly(stream); in test4Nodes()
88 actual = stream.ToString(); in test4Nodes()
107 BufferedTreeNodeStream stream = new BufferedTreeNodeStream(root); in testList()
109 string actual = GetStringOfEntireStreamContentsWithNodeTypesOnly(stream); in testList()
113 actual = stream.ToString(); in testList()
126 BufferedTreeNodeStream stream = new BufferedTreeNodeStream(root); in testFlatList()
128 string actual = GetStringOfEntireStreamContentsWithNodeTypesOnly(stream); in testFlatList()
132 actual = stream.ToString(); in testFlatList()
143 BufferedTreeNodeStream stream = new BufferedTreeNodeStream(root); in testListWithOneNode()
145 string actual = GetStringOfEntireStreamContentsWithNodeTypesOnly(stream); in testListWithOneNode()
149 actual = stream.ToString(); in testListWithOneNode()
159 ITreeNodeStream stream = CreateBufferedTreeNodeStream(t); in testAoverB()
161 string actual = GetStringOfEntireStreamContentsWithNodeTypesOnly(stream); in testAoverB()
165 actual = stream.ToString(); in testAoverB()
178 ITreeNodeStream stream = CreateBufferedTreeNodeStream(t); in testLT()
179 Assert.AreEqual(101, ((ITree)stream.LT(1)).Type); in testLT()
180 Assert.AreEqual(Token.Down, ((ITree)stream.LT(2)).Type); in testLT()
181 Assert.AreEqual(102, ((ITree)stream.LT(3)).Type); in testLT()
182 Assert.AreEqual(Token.Down, ((ITree)stream.LT(4)).Type); in testLT()
183 Assert.AreEqual(103, ((ITree)stream.LT(5)).Type); in testLT()
184 Assert.AreEqual(Token.Up, ((ITree)stream.LT(6)).Type); in testLT()
185 Assert.AreEqual(104, ((ITree)stream.LT(7)).Type); in testLT()
186 Assert.AreEqual(Token.Up, ((ITree)stream.LT(8)).Type); in testLT()
187 Assert.AreEqual(Token.EndOfFile, ((ITree)stream.LT(9)).Type); in testLT()
189 Assert.AreEqual(Token.EndOfFile, ((ITree)stream.LT(100)).Type); in testLT()
208 BufferedTreeNodeStream stream = new BufferedTreeNodeStream(r0); in testMarkRewindEntire()
209 int m = stream.Mark(); // MARK in testMarkRewindEntire()
212 stream.LT(1); in testMarkRewindEntire()
213 stream.Consume(); in testMarkRewindEntire()
215 Assert.AreEqual(Token.EndOfFile, ((ITree)stream.LT(1)).Type); in testMarkRewindEntire()
216 Assert.AreEqual(Token.Up, ((ITree)stream.LT(-1)).Type); in testMarkRewindEntire()
217 stream.Rewind(m); // REWIND in testMarkRewindEntire()
222 stream.LT(1); in testMarkRewindEntire()
223 stream.Consume(); in testMarkRewindEntire()
225 Assert.AreEqual(Token.EndOfFile, ((ITree)stream.LT(1)).Type); in testMarkRewindEntire()
226 Assert.AreEqual(Token.Up, ((ITree)stream.LT(-1)).Type); in testMarkRewindEntire()
245 BufferedTreeNodeStream stream = new BufferedTreeNodeStream(r0); in testMarkRewindInMiddle()
249 stream.Consume(); in testMarkRewindInMiddle()
251 Assert.AreEqual(107, ((ITree)stream.LT(1)).Type); in testMarkRewindInMiddle()
252 int m = stream.Mark(); // MARK in testMarkRewindInMiddle()
253 stream.Consume(); // consume 107 in testMarkRewindInMiddle()
254 stream.Consume(); // consume Up in testMarkRewindInMiddle()
255 stream.Consume(); // consume Up in testMarkRewindInMiddle()
256 stream.Consume(); // consume 104 in testMarkRewindInMiddle()
257 stream.Rewind(m); // REWIND in testMarkRewindInMiddle()
259 Assert.AreEqual(107, ((ITree)stream.LT(1)).Type); in testMarkRewindInMiddle()
260 stream.Consume(); in testMarkRewindInMiddle()
261 Assert.AreEqual(Token.Up, ((ITree)stream.LT(1)).Type); in testMarkRewindInMiddle()
262 stream.Consume(); in testMarkRewindInMiddle()
263 Assert.AreEqual(Token.Up, ((ITree)stream.LT(1)).Type); in testMarkRewindInMiddle()
264 stream.Consume(); in testMarkRewindInMiddle()
265 Assert.AreEqual(104, ((ITree)stream.LT(1)).Type); in testMarkRewindInMiddle()
266 stream.Consume(); in testMarkRewindInMiddle()
268 Assert.AreEqual(105, ((ITree)stream.LT(1)).Type); in testMarkRewindInMiddle()
269 stream.Consume(); in testMarkRewindInMiddle()
270 Assert.AreEqual(Token.Up, ((ITree)stream.LT(1)).Type); in testMarkRewindInMiddle()
271 stream.Consume(); in testMarkRewindInMiddle()
272 Assert.AreEqual(Token.EndOfFile, ((ITree)stream.LT(1)).Type); in testMarkRewindInMiddle()
273 Assert.AreEqual(Token.Up, ((ITree)stream.LT(-1)).Type); in testMarkRewindInMiddle()
292 BufferedTreeNodeStream stream = new BufferedTreeNodeStream(r0); in testMarkRewindNested()
293 int m = stream.Mark(); // MARK at start in testMarkRewindNested()
294 stream.Consume(); // consume 101 in testMarkRewindNested()
295 stream.Consume(); // consume DN in testMarkRewindNested()
296 int m2 = stream.Mark(); // MARK on 102 in testMarkRewindNested()
297 stream.Consume(); // consume 102 in testMarkRewindNested()
298 stream.Consume(); // consume DN in testMarkRewindNested()
299 stream.Consume(); // consume 103 in testMarkRewindNested()
300 stream.Consume(); // consume 106 in testMarkRewindNested()
301 stream.Rewind(m2); // REWIND to 102 in testMarkRewindNested()
302 Assert.AreEqual(102, ((ITree)stream.LT(1)).Type); in testMarkRewindNested()
303 stream.Consume(); in testMarkRewindNested()
304 Assert.AreEqual(Token.Down, ((ITree)stream.LT(1)).Type); in testMarkRewindNested()
305 stream.Consume(); in testMarkRewindNested()
307 stream.Rewind(m); // REWIND to 101 in testMarkRewindNested()
308 Assert.AreEqual(101, ((ITree)stream.LT(1)).Type); in testMarkRewindNested()
309 stream.Consume(); in testMarkRewindNested()
310 Assert.AreEqual(Token.Down, ((ITree)stream.LT(1)).Type); in testMarkRewindNested()
311 stream.Consume(); in testMarkRewindNested()
312 Assert.AreEqual(102, ((ITree)stream.LT(1)).Type); in testMarkRewindNested()
313 stream.Consume(); in testMarkRewindNested()
314 Assert.AreEqual(Token.Down, ((ITree)stream.LT(1)).Type); in testMarkRewindNested()
333 BufferedTreeNodeStream stream = new BufferedTreeNodeStream(r0); in testSeek()
334 stream.Consume(); // consume 101 in testSeek()
335 stream.Consume(); // consume DN in testSeek()
336 stream.Consume(); // consume 102 in testSeek()
337 stream.Seek(7); // seek to 107 in testSeek()
338 Assert.AreEqual(107, ((ITree)stream.LT(1)).Type); in testSeek()
339 stream.Consume(); // consume 107 in testSeek()
340 stream.Consume(); // consume Up in testSeek()
341 stream.Consume(); // consume Up in testSeek()
342 Assert.AreEqual(104, ((ITree)stream.LT(1)).Type); in testSeek()
361 BufferedTreeNodeStream stream = new BufferedTreeNodeStream(r0); in testSeekFromStart()
362 stream.Seek(7); // seek to 107 in testSeekFromStart()
363 Assert.AreEqual(107, ((ITree)stream.LT(1)).Type); in testSeekFromStart()
364 stream.Consume(); // consume 107 in testSeekFromStart()
365 stream.Consume(); // consume Up in testSeekFromStart()
366 stream.Consume(); // consume Up in testSeekFromStart()
367 Assert.AreEqual(104, ((ITree)stream.LT(1)).Type); in testSeekFromStart()
389 BufferedTreeNodeStream stream = new BufferedTreeNodeStream(r0); in testPushPop()
391 String found = stream.ToString(); in testPushPop()
400 stream.Consume(); in testPushPop()
403 Assert.AreEqual(107, ((ITree)stream.LT(1)).Type); in testPushPop()
404 stream.Push(indexOf102); in testPushPop()
405 Assert.AreEqual(102, ((ITree)stream.LT(1)).Type); in testPushPop()
406 stream.Consume(); // consume 102 in testPushPop()
407 Assert.AreEqual(Token.Down, ((ITree)stream.LT(1)).Type); in testPushPop()
408 stream.Consume(); // consume DN in testPushPop()
409 Assert.AreEqual(103, ((ITree)stream.LT(1)).Type); in testPushPop()
410 stream.Consume(); // consume 103 in testPushPop()
411 Assert.AreEqual(Token.Up, ((ITree)stream.LT(1)).Type); in testPushPop()
413 stream.Pop(); in testPushPop()
414 Assert.AreEqual(107, ((ITree)stream.LT(1)).Type); in testPushPop()
436 BufferedTreeNodeStream stream = new BufferedTreeNodeStream(r0); in testNestedPushPop()
445 stream.Consume(); in testNestedPushPop()
447 Assert.AreEqual(107, ((ITree)stream.LT(1)).Type); in testNestedPushPop()
449 stream.Push(indexOf102); in testNestedPushPop()
450 Assert.AreEqual(102, ((ITree)stream.LT(1)).Type); in testNestedPushPop()
451 stream.Consume(); // consume 102 in testNestedPushPop()
452 Assert.AreEqual(Token.Down, ((ITree)stream.LT(1)).Type); in testNestedPushPop()
453 stream.Consume(); // consume DN in testNestedPushPop()
454 Assert.AreEqual(103, ((ITree)stream.LT(1)).Type); in testNestedPushPop()
455 stream.Consume(); // consume 103 in testNestedPushPop()
459 stream.Push(indexOf104); in testNestedPushPop()
460 Assert.AreEqual(104, ((ITree)stream.LT(1)).Type); in testNestedPushPop()
461 stream.Consume(); // consume 102 in testNestedPushPop()
462 Assert.AreEqual(Token.Down, ((ITree)stream.LT(1)).Type); in testNestedPushPop()
463 stream.Consume(); // consume DN in testNestedPushPop()
464 Assert.AreEqual(105, ((ITree)stream.LT(1)).Type); in testNestedPushPop()
465 stream.Consume(); // consume 103 in testNestedPushPop()
466 Assert.AreEqual(Token.Up, ((ITree)stream.LT(1)).Type); in testNestedPushPop()
468 stream.Pop(); in testNestedPushPop()
470 Assert.AreEqual(Token.Up, ((ITree)stream.LT(1)).Type); in testNestedPushPop()
472 stream.Pop(); in testNestedPushPop()
473 Assert.AreEqual(107, ((ITree)stream.LT(1)).Type); in testNestedPushPop()
495 BufferedTreeNodeStream stream = new BufferedTreeNodeStream(r0); in testPushPopFromEOF()
497 while (stream.LA(1) != Token.EndOfFile) in testPushPopFromEOF()
499 stream.Consume(); in testPushPopFromEOF()
503 Assert.AreEqual(Token.EndOfFile, ((ITree)stream.LT(1)).Type); in testPushPopFromEOF()
506 stream.Push(indexOf102); in testPushPopFromEOF()
507 Assert.AreEqual(102, ((ITree)stream.LT(1)).Type); in testPushPopFromEOF()
508 stream.Consume(); // consume 102 in testPushPopFromEOF()
509 Assert.AreEqual(Token.Down, ((ITree)stream.LT(1)).Type); in testPushPopFromEOF()
510 stream.Consume(); // consume DN in testPushPopFromEOF()
511 Assert.AreEqual(103, ((ITree)stream.LT(1)).Type); in testPushPopFromEOF()
512 stream.Consume(); // consume 103 in testPushPopFromEOF()
513 Assert.AreEqual(Token.Up, ((ITree)stream.LT(1)).Type); in testPushPopFromEOF()
515 stream.Pop(); in testPushPopFromEOF()
516 Assert.AreEqual(Token.EndOfFile, ((ITree)stream.LT(1)).Type); in testPushPopFromEOF()
519 stream.Push(indexOf104); in testPushPopFromEOF()
520 Assert.AreEqual(104, ((ITree)stream.LT(1)).Type); in testPushPopFromEOF()
521 stream.Consume(); // consume 102 in testPushPopFromEOF()
522 Assert.AreEqual(Token.Down, ((ITree)stream.LT(1)).Type); in testPushPopFromEOF()
523 stream.Consume(); // consume DN in testPushPopFromEOF()
524 Assert.AreEqual(105, ((ITree)stream.LT(1)).Type); in testPushPopFromEOF()
525 stream.Consume(); // consume 103 in testPushPopFromEOF()
526 Assert.AreEqual(Token.Up, ((ITree)stream.LT(1)).Type); in testPushPopFromEOF()
528 stream.Pop(); in testPushPopFromEOF()
529 Assert.AreEqual(Token.EndOfFile, ((ITree)stream.LT(1)).Type); in testPushPopFromEOF()
537 BufferedTreeNodeStream stream = new BufferedTreeNodeStream(r0); in testStackStretch()
541 stream.Push(i); in testStackStretch()
543 Assert.AreEqual(10, stream.Pop()); in testStackStretch()
544 Assert.AreEqual(9, stream.Pop()); in testStackStretch()
574 ITreeNodeStream stream = CreateCommonTreeNodeStream(t); in testBufferOverflow()
576 String found = GetStringOfEntireStreamContentsWithNodeTypesOnly(stream); in testBufferOverflow()
580 found = stream.ToString(); in testBufferOverflow()
608 ITreeNodeStream stream = CreateCommonTreeNodeStream(t); in testBufferWrap()
611 ITree node = (ITree)stream.LT(1); in testBufferWrap()
613 stream.Consume(); in testBufferWrap()
622 ITree node = (ITree)stream.LT(i); // look ahead to ith token in testBufferWrap()