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

Side by Side Diff: dart/samples/tests/samples/lib/touch/touch_test.dart

Issue 11233061: Revert "Parts must start with 'part of'" and "Attempt to fix VM build" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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 '../../../../../pkg/unittest/unittest.dart'; 9 #import('../../../../../pkg/unittest/unittest.dart');
10 import '../../../../../pkg/unittest/html_config.dart'; 10 #import('../../../../../pkg/unittest/html_config.dart');
11 import '../../../../ui_lib/touch/touch.dart'; 11 #import('../../../../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)).approxEquals(9); 16 expect(Solver.solve((x) => x * x, 81, 10)).approxEquals(9);
17 expect(Solver.solve((x) => x * x, 0, 10)).approxEquals(0); 17 expect(Solver.solve((x) => x * x, 0, 10)).approxEquals(0);
18 expect(Solver.solve((x) => x * x, 1.5625, 10)).approxEquals(1.25); 18 expect(Solver.solve((x) => x * x, 1.5625, 10)).approxEquals(1.25);
19 expect(Solver.solve((x) => 1 / x, 10, 1)).approxEquals(0.1); 19 expect(Solver.solve((x) => 1 / x, 10, 1)).approxEquals(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