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

Unified Diff: samples/github/lib/src/tests/commit_list_test_disabled.dart

Issue 2035023003: Remove service-compiler related code. (Closed) Base URL: git@github.com:dartino/sdk.git@master
Patch Set: Created 4 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/github/lib/src/image.immi ('k') | samples/github/lib/src/tests/github_api_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/github/lib/src/tests/commit_list_test_disabled.dart
diff --git a/samples/github/lib/src/tests/commit_list_test_disabled.dart b/samples/github/lib/src/tests/commit_list_test_disabled.dart
deleted file mode 100644
index 305c7e50463d743cdd1577d7710e1f9c178ee3af..0000000000000000000000000000000000000000
--- a/samples/github/lib/src/tests/commit_list_test_disabled.dart
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE.md file.
-
-import 'package:expect/expect.dart';
-
-import 'package:immi/immi.dart';
-import 'package:immi_samples/sliding_window.dart';
-import 'package:service/struct.dart';
-
-import 'package:immi_gen/dart/immi_service.dart';
-
-import '../../github_immi.dart';
-import '../github_services.dart';
-import '../github_mock.dart';
-import '../commit_list_presenter.dart';
-import '../commit_presenter.dart';
-
-void main() {
- var mock = new GithubMock()..spawn();
- var server = new Server(mock.host, mock.port);
- var user = server.getUser('dartino');
- var repo = user.getRepository('sdk');
- testPresent(repo);
- server.close();
- mock.close();
-}
-
-void testPresent(Repository repo) {
- var presenter = new CommitListPresenter(repo);
- SlidingWindowNode previous = null;
- SlidingWindowNode current = null;
- CommitNode commitNode = null;
-
- // Initial rendering (don't assume much about this).
- current = presenter.present(previous);
- testDiff(previous, current);
-
- // Provide screen-size and re-render.
- (current.display)(0, 5);
- previous = current;
- current = presenter.present(previous);
- Expect.equals(0, current.startOffset);
- Expect.equals(5, current.window.length);
- commitNode = current.window[0];
- Expect.stringEquals("Ian Zerny", commitNode.author);
- testDiff(previous, current);
-
- (current.display)(0, 6);
- previous = current;
- current = presenter.present(previous);
- Expect.equals(0, current.startOffset);
- Expect.isTrue(current.window.length >= 6);
- commitNode = current.window[0];
- Expect.stringEquals("Ian Zerny", commitNode.author);
- testDiff(previous, current);
-
- (current.display)(1, 6);
- previous = current;
- current = presenter.present(previous);
- Expect.equals(1, current.startOffset);
- Expect.equals(1, current.windowOffset);
- Expect.isTrue(current.window.length >= 5);
- commitNode = current.window[1];
- Expect.stringEquals("Anders Johnsen", commitNode.author);
- testDiff(previous, current);
-
- (current.display)(100, 105);
- previous = current;
- current = presenter.present(previous);
- Expect.equals(100, current.startOffset);
- Expect.equals(0, current.windowOffset);
-
- (current.display)(99, 104);
- previous = current;
- current = presenter.present(previous);
- Expect.equals(99, current.startOffset);
- Expect.equals(4, current.windowOffset);
-}
-
-testDiff(Node previous, Node current) {
- NodePatch patch = current.diff(previous);
- Expect.isNotNull(patch);
-
- // Check that we can successfully serialize the data.
- var manager = new ResourceManager();
- var mb = new MessageBuilder(24);
- PatchDataBuilder builder = mb.initRoot(new PatchDataBuilder(), 16);
- patch.serializeNode(builder.initNode(), manager);
-}
« no previous file with comments | « samples/github/lib/src/image.immi ('k') | samples/github/lib/src/tests/github_api_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698