Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: sdk/lib/_internal/pub/test/transcript_test.dart

Issue 111103002: Make the solver deterministic (again). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Make log discard from the middle. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/transcript.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 library version_test;
6
7 import 'package:unittest/unittest.dart';
8 import 'test_pub.dart';
9 import '../lib/src/transcript.dart';
10
11 main() {
12 initConfig();
13
14 test('forEach', () {
15 var transcript = new Transcript<String>(4);
16 forEachToString() {
17 var result = "";
18 transcript.forEach((entry) => result += entry, (n) => result += "[$n]");
19 return result;
20 }
21
22 expect(forEachToString(), equals(""));
23 transcript.add("a");
24 expect(forEachToString(), equals("a"));
25 transcript.add("b");
26 expect(forEachToString(), equals("ab"));
27 transcript.add("c");
28 expect(forEachToString(), equals("abc"));
29 transcript.add("d");
30 expect(forEachToString(), equals("abcd"));
31 transcript.add("e");
32 expect(forEachToString(), equals("ab[1]de"));
33 transcript.add("f");
34 expect(forEachToString(), equals("ab[2]ef"));
35 });
36 }
nweiz 2013/12/11 06:53:03 Add a test where it doesn't discard entries as wel
Bob Nystrom 2013/12/11 17:40:01 Done.
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/transcript.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698