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

Side by Side Diff: pkg/analyzer/test/generated/utilities_test.dart

Issue 677303002: Remove unnecessary List creation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.utilities_test; 8 library engine.utilities_test;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after
2357 DirectedGraph<DirectedGraphTest_Node> graph = 2357 DirectedGraph<DirectedGraphTest_Node> graph =
2358 new DirectedGraph<DirectedGraphTest_Node>(); 2358 new DirectedGraph<DirectedGraphTest_Node>();
2359 graph.addEdge(node1, node2); 2359 graph.addEdge(node1, node2);
2360 graph.addEdge(node2, node1); 2360 graph.addEdge(node2, node1);
2361 graph.addEdge(node1, node3); 2361 graph.addEdge(node1, node3);
2362 graph.addEdge(node3, node4); 2362 graph.addEdge(node3, node4);
2363 graph.addEdge(node4, node3); 2363 graph.addEdge(node4, node3);
2364 List<List<DirectedGraphTest_Node>> topologicalSort = 2364 List<List<DirectedGraphTest_Node>> topologicalSort =
2365 graph.computeTopologicalSort(); 2365 graph.computeTopologicalSort();
2366 EngineTestCase.assertSizeOfList(2, topologicalSort); 2366 EngineTestCase.assertSizeOfList(2, topologicalSort);
2367 EngineTestCase.assertContains( 2367 EngineTestCase.assertContains(topologicalSort[0], [node3, node4]);
2368 new List.from(topologicalSort[0]), 2368 EngineTestCase.assertContains(topologicalSort[1], [node1, node2]);
2369 [node3, node4]);
2370 EngineTestCase.assertContains(
2371 new List.from(topologicalSort[1]),
2372 [node1, node2]);
2373 } 2369 }
2374 } 2370 }
2375 2371
2376 /** 2372 /**
2377 * Instances of the class `Node` represent simple nodes used for testing purpose s. 2373 * Instances of the class `Node` represent simple nodes used for testing purpose s.
2378 */ 2374 */
2379 class DirectedGraphTest_Node { 2375 class DirectedGraphTest_Node {
2380 } 2376 }
2381 2377
2382 class Getter_NodeReplacerTest_testAnnotatedNode implements 2378 class Getter_NodeReplacerTest_testAnnotatedNode implements
(...skipping 2982 matching lines...) Expand 10 before | Expand all | Expand 10 after
5365 } 5361 }
5366 5362
5367 void test_get_added() { 5363 void test_get_added() {
5368 TokenMap tokenMap = new TokenMap(); 5364 TokenMap tokenMap = new TokenMap();
5369 Token key = TokenFactory.tokenFromType(TokenType.AT); 5365 Token key = TokenFactory.tokenFromType(TokenType.AT);
5370 Token value = TokenFactory.tokenFromType(TokenType.AT); 5366 Token value = TokenFactory.tokenFromType(TokenType.AT);
5371 tokenMap.put(key, value); 5367 tokenMap.put(key, value);
5372 JUnitTestCase.assertSame(value, tokenMap.get(key)); 5368 JUnitTestCase.assertSame(value, tokenMap.get(key));
5373 } 5369 }
5374 } 5370 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698