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

Side by Side Diff: samples/tests/samples/src/lib/touch/TouchTest.dart

Issue 9537001: Generate dart:html bindings for Dartium as well as Frog. All unittests now pass (or are disabled fo… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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('touch_tests'); 5 #library('touch_tests');
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('../../../../../../client/testing/unittest/unittest.dart'); 9 #import('../../../../../../client/testing/unittest/unittest_html.dart');
10 #import('../../../../../ui_lib/touch/touch.dart'); 10 #import('../../../../../ui_lib/touch/touch.dart');
11 11
12 main() { 12 main() {
13 test('Solver', () { 13 test('Solver', () {
14 expect(Solver.solve((x) => x * x, 81, 10)).approxEquals(9); 14 expect(Solver.solve((x) => x * x, 81, 10)).approxEquals(9);
15 expect(Solver.solve((x) => x * x, 0, 10)).approxEquals(0); 15 expect(Solver.solve((x) => x * x, 0, 10)).approxEquals(0);
16 expect(Solver.solve((x) => x * x, 1.5625, 10)).approxEquals(1.25); 16 expect(Solver.solve((x) => x * x, 1.5625, 10)).approxEquals(1.25);
17 expect(Solver.solve((x) => 1 / x, 10, 1)).approxEquals(0.1); 17 expect(Solver.solve((x) => 1 / x, 10, 1)).approxEquals(0.1);
18 }); 18 });
19 19
(...skipping 21 matching lines...) Expand all
41 onDecelerateCallback(x, y, duration, timingFunction); 41 onDecelerateCallback(x, y, duration, timingFunction);
42 } 42 }
43 43
44 /** 44 /**
45 * Callback for end of deceleration. 45 * Callback for end of deceleration.
46 */ 46 */
47 void onDecelerationEnd() { 47 void onDecelerationEnd() {
48 onDecelerationEndCallback(); 48 onDecelerationEndCallback();
49 } 49 }
50 } 50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698