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

Side by Side Diff: samples/swarm/test/swarm_ui_lib/touch/touch_test.dart

Issue 23717003: Reorganize tests for samples so the test is discoverable from the sample (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 library touchTests; 5 library touchTests;
6 6
7 import 'dart:html'; // TODO(rnystrom): Only needed to tell architecture.py 7 import 'dart:html'; // TODO(rnystrom): Only needed to tell architecture.py
8 // that this is a web test. Come up with cleaner solution. 8 // that this is a web test. Come up with cleaner solution.
9 import '../../../../../pkg/unittest/lib/unittest.dart'; 9 import 'package:unittest/html_config.dart';
10 import '../../../../../pkg/unittest/lib/html_config.dart'; 10 import 'package:unittest/unittest.dart';
11 import '../../../../swarm/swarm_ui_lib/touch/touch.dart'; 11 import '../../../swarm_ui_lib/touch/touch.dart';
12 12
13 main() { 13 main() {
14 useHtmlConfiguration(); 14 useHtmlConfiguration();
15 test('Solver', () { 15 test('Solver', () {
16 expect(Solver.solve((x) => x * x, 81, 10), closeTo(9, 0.1)); 16 expect(Solver.solve((x) => x * x, 81, 10), closeTo(9, 0.1));
17 expect(Solver.solve((x) => x * x, 0, 10), closeTo(0, 0.1)); 17 expect(Solver.solve((x) => x * x, 0, 10), closeTo(0, 0.1));
18 expect(Solver.solve((x) => x * x, 1.5625, 10), closeTo(1.25, 0.1)); 18 expect(Solver.solve((x) => x * x, 1.5625, 10), closeTo(1.25, 0.1));
19 expect(Solver.solve((x) => 1 / x, 10, 1), closeTo(0.1, 0.1)); 19 expect(Solver.solve((x) => 1 / x, 10, 1), closeTo(0.1, 0.1));
20 }); 20 });
21 21
(...skipping 21 matching lines...) Expand all
43 onDecelerateCallback(x, y, duration, timingFunction); 43 onDecelerateCallback(x, y, duration, timingFunction);
44 } 44 }
45 45
46 /** 46 /**
47 * Callback for end of deceleration. 47 * Callback for end of deceleration.
48 */ 48 */
49 void onDecelerationEnd() { 49 void onDecelerationEnd() {
50 onDecelerationEndCallback(); 50 onDecelerationEndCallback();
51 } 51 }
52 } 52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698