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

Unified Diff: samples/pop_pop_win/test/field_test.dart

Issue 786443002: Delete pop-pop-win from the repo (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/pop_pop_win/readme.md ('k') | samples/pop_pop_win/test/game_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/pop_pop_win/test/field_test.dart
diff --git a/samples/pop_pop_win/test/field_test.dart b/samples/pop_pop_win/test/field_test.dart
deleted file mode 100644
index 93311a08dccd976f7f430d0ff4c345d494455048..0000000000000000000000000000000000000000
--- a/samples/pop_pop_win/test/field_test.dart
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2014, the Dart 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 file.
-library pop_pop_win.field_test;
-
-import 'package:pop_pop_win/src/game.dart';
-import 'package:unittest/unittest.dart';
-
-import 'test_util.dart';
-
-void main() {
- test('defaults', _testDefaults);
- test('bombCount', _testBombCount);
- test('fromSquares', _testFromSquares);
- test('adjacent', _testAdjacent);
-}
-
-void _testDefaults() {
- var f = new Field();
-
- expect(f.bombCount, equals(40));
- expect(f.height, equals(16));
- expect(f.width, equals(16));
-}
-
-void _testBombCount() {
- var f = new Field();
-
- int bombCount = 0;
- for (int x = 0; x < 16; x++) {
- for (int y = 0; y < 16; y++) {
- if (f.get(x, y)) {
- bombCount++;
- }
- }
- }
- expect(bombCount, equals(f.bombCount));
-}
-
-void _testFromSquares() {
- var f = new Field.fromSquares(2, 2, [true, true, true, false]);
- expect(f.height, equals(2));
- expect(f.width, equals(2));
- expect(f.bombCount, equals(3));
-}
-
-void _testAdjacent() {
- var f = getSampleField();
-
- expect(f.bombCount, equals(13));
-
- for (int x = 0; x < f.width; x++) {
- for (int y = 0; y < f.height; y++) {
- var i = x + y * f.width;
- var adj = f.getAdjacentCount(x, y);
- expect(adj, equals(SAMPLE_FIELD[i]));
- }
- }
-}
« no previous file with comments | « samples/pop_pop_win/readme.md ('k') | samples/pop_pop_win/test/game_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698