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

Side by Side Diff: tests/compiler/dart2js_native/native_null_frog_test.dart

Issue 383413003: Add @Native(...) annotation for native class names. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 5 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 import "dart:_js_helper";
5 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
6 7
7 // Test for values of some basic types. 8 // Test for values of some basic types.
8 9
9 10
10 class A native "A" { 11 @Native("A")
12 class A {
11 returnNull() native; 13 returnNull() native;
12 returnUndefined() native; 14 returnUndefined() native;
13 returnEmptyString() native; 15 returnEmptyString() native;
14 returnZero() native; 16 returnZero() native;
15 } 17 }
16 18
17 A makeA() native; 19 A makeA() native;
18 20
19 void setup() native """ 21 void setup() native """
20 function A() {} 22 function A() {}
(...skipping 11 matching lines...) Expand all
32 Expect.equals(null, a.returnNull()); 34 Expect.equals(null, a.returnNull());
33 Expect.equals(null, a.returnUndefined()); 35 Expect.equals(null, a.returnUndefined());
34 36
35 Expect.equals('', a.returnEmptyString()); 37 Expect.equals('', a.returnEmptyString());
36 Expect.isTrue(a.returnEmptyString().isEmpty); 38 Expect.isTrue(a.returnEmptyString().isEmpty);
37 Expect.isTrue(a.returnEmptyString() is String); 39 Expect.isTrue(a.returnEmptyString() is String);
38 40
39 Expect.isTrue(a.returnZero() is int); 41 Expect.isTrue(a.returnZero() is int);
40 Expect.equals(0, a.returnZero()); 42 Expect.equals(0, a.returnZero());
41 } 43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698