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

Side by Side Diff: tests/language/src/NumbersTest.dart

Issue 10248007: test rename overhaul: step 8 - language tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4 // Test number types.
5
6 #library("NumbersTest.dart");
7 #import("dart:coreimpl");
8
9 class NumbersTest {
10 static double testMain() {
11 var one = 1;
12 Expect.equals(true, one is Object);
13 Expect.equals(true, one is num);
14 Expect.equals(true, one is int);
15 Expect.equals(true, one is Smi);
16 Expect.equals(false, one is double);
17 Expect.equals(false, one is Double);
18
19 var two = 2.0;
20 Expect.equals(true, two is Object);
21 Expect.equals(true, two is num);
22 Expect.equals(false, two is int);
23 Expect.equals(false, two is Smi);
24 Expect.equals(true, two is double);
25 Expect.equals(true, two is Double);
26
27 var result = one + two;
28 Expect.equals(true, result is Object);
29 Expect.equals(true, result is num);
30 Expect.equals(false, result is int);
31 Expect.equals(false, result is Smi);
32 Expect.equals(true, result is double);
33 Expect.equals(true, result is Double);
34
35 Expect.equals(3.0, result);
36 return result;
37 }
38 }
39
40
41 main() {
42 NumbersTest.testMain();
43 }
OLDNEW
« no previous file with comments | « tests/language/src/NumberSyntaxTest.dart ('k') | tests/language/src/ObjectDynamicMethodTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698