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

Unified Diff: tests/language/built_in_identifier_test.dart

Issue 23716002: Update the tests testing the use of built in identifiers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/language/built_in_identifier_illegal_test.dart ('k') | tests/language/language_analyzer.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/built_in_identifier_test.dart
diff --git a/tests/language/pseudo_kw_test.dart b/tests/language/built_in_identifier_test.dart
similarity index 67%
rename from tests/language/pseudo_kw_test.dart
rename to tests/language/built_in_identifier_test.dart
index 0e55cc11cc66512f25ad5bfa75a2f3d78c3f0e4c..511641625779786610e3cac90630696fdf3a1061 100644
--- a/tests/language/pseudo_kw_test.dart
+++ b/tests/language/built_in_identifier_test.dart
@@ -12,21 +12,20 @@ class PseudoKWTest {
// This is a list of built-in identifiers from the Dart spec.
// It sanity checks that these pseudo-keywords are legal identifiers.
- var abstract = 0;
+ var abstract = 0; /// 01: ok
var as = 0;
- var call = 0;
var dynamic = 0;
+ var export = 0;
+ var external = 0; /// 01: ok
var factory = 0;
var get = 0;
var implements = 0;
var import = 0;
- var interface = 0;
var library = 0;
- var negate = 0;
var operator = 0;
+ var part = 0;
var set = 0;
- var source = 0;
- var static = 0;
+ var static = 0; /// 01: ok
var typedef = 0;
// "native" is a per-implementation extension that is not a part of the
@@ -39,7 +38,7 @@ class PseudoKWTest {
// attempt at complete coverage.
{
void factory(set) {
- return 0;
+ return 0; /// 01: ok
ahe 2013/09/04 11:52:39 I suspect there should be a static warning here.
}
}
@@ -47,15 +46,17 @@ class PseudoKWTest {
break get;
}
- return static + library * operator;
+ return
+ static + /// 01: ok
+ library * operator;
}
}
-typedef(x) => "typedef $x";
+typedef(x) => "typedef $x"; /// 01: ok
-static(abstract) {
- return abstract == true;
-}
+static(abstract) { /// 01: ok
+ return abstract == true; /// 01: ok
+} /// 01: ok
class A {
var typedef = 0;
@@ -64,14 +65,14 @@ class A {
set(x) { typedef = x; }
get() => typedef - 5;
- static static() {
- return 1;
- }
+ static static() { /// 01: ok
+ return 1; /// 01: ok
+ } /// 01: ok
static check() {
var o = new A();
o.set(55);
Expect.equals(50, o.get());
- static();
+ static(); /// 01: ok
}
}
@@ -80,11 +81,11 @@ class B {
get get => set;
set get(get) => set = 2 * get.get;
- static() {
- var set = new B();
- set.get = set;
- Expect.equals(200, set.get);
- }
+ static() { /// 01: ok
+ var set = new B(); /// 01: ok
+ set.get = set; /// 01: ok
+ Expect.equals(200, set.get); /// 01: ok
+ } /// 01: ok
int operator() {
return 1;
}
@@ -101,13 +102,13 @@ class C {
main() {
PseudoKWTest.testMain();
A.check();
- new B().static();
+ new B().static(); /// 01: ok
Expect.equals(1, new B().operator());
- Expect.equals(1, A.static());
- typedef("T");
- Expect.equals("typedef T", typedef("T"));
- static("true");
- Expect.equals(false, static("true"));
+ Expect.equals(1, A.static()); /// 01: ok
+ typedef("T"); /// 01: ok
+ Expect.equals("typedef T", typedef("T")); /// 01: ok
+ static("true"); /// 01: ok
+ Expect.equals(false, static("true")); /// 01: ok
Expect.equals(5, C.operator);
Expect.equals(null, C.get);
C.set = 0;
« no previous file with comments | « tests/language/built_in_identifier_illegal_test.dart ('k') | tests/language/language_analyzer.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698