|
@@ -2,36 +2,42 @@ package cases;
|
|
|
|
|
|
class Issue7053 extends DisplayTestCase {
|
|
|
/**
|
|
|
- {-1-}
|
|
|
+ {-1-}
|
|
|
**/
|
|
|
function testFull() {
|
|
|
var fields = toplevel(pos(1));
|
|
|
// technically, "package" should be here too. But I think the test system adds a
|
|
|
// package statement automatically, so it is omitted.
|
|
|
- for (expected in ["import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"]) {
|
|
|
+ for (expected in [
|
|
|
+ "import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"
|
|
|
+ ]) {
|
|
|
eq(true, hasField(fields, expected, null, "keyword"));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- i{-1-}
|
|
|
+ i{-1-}
|
|
|
**/
|
|
|
function testFullIdent() {
|
|
|
var fields = toplevel(pos(1));
|
|
|
// technically, "package" should be here too. But I think the test system adds a
|
|
|
// package statement automatically, so it is omitted.
|
|
|
- for (expected in ["import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"]) {
|
|
|
+ for (expected in [
|
|
|
+ "import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"
|
|
|
+ ]) {
|
|
|
eq(true, hasField(fields, expected, null, "keyword"));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- import String;
|
|
|
- {-1-}
|
|
|
+ import String;
|
|
|
+ {-1-}
|
|
|
**/
|
|
|
function testAfterImport() {
|
|
|
var fields = toplevel(pos(1));
|
|
|
- for (expected in ["import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"]) {
|
|
|
+ for (expected in [
|
|
|
+ "import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"
|
|
|
+ ]) {
|
|
|
eq(true, hasField(fields, expected, null, "keyword"));
|
|
|
}
|
|
|
for (unexpected in ["package"]) {
|
|
@@ -40,12 +46,14 @@ class Issue7053 extends DisplayTestCase {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- import String;
|
|
|
- i{-1-}
|
|
|
+ import String;
|
|
|
+ i{-1-}
|
|
|
**/
|
|
|
function testAfterImportIdent() {
|
|
|
var fields = toplevel(pos(1));
|
|
|
- for (expected in ["import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"]) {
|
|
|
+ for (expected in [
|
|
|
+ "import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"
|
|
|
+ ]) {
|
|
|
eq(true, hasField(fields, expected, null, "keyword"));
|
|
|
}
|
|
|
for (unexpected in ["package"]) {
|
|
@@ -54,12 +62,21 @@ class Issue7053 extends DisplayTestCase {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- class C { }
|
|
|
- {-1-}
|
|
|
+ class C { }
|
|
|
+ {-1-}
|
|
|
**/
|
|
|
function testAfterClass() {
|
|
|
var fields = toplevel(pos(1));
|
|
|
- for (expected in ["private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"]) {
|
|
|
+ for (expected in [
|
|
|
+ "private",
|
|
|
+ "extern",
|
|
|
+ "class",
|
|
|
+ "interface",
|
|
|
+ "enum",
|
|
|
+ "abstract",
|
|
|
+ "typedef",
|
|
|
+ "final"
|
|
|
+ ]) {
|
|
|
eq(true, hasField(fields, expected, null, "keyword"));
|
|
|
}
|
|
|
for (unexpected in ["import", "using", "package"]) {
|
|
@@ -68,12 +85,21 @@ class Issue7053 extends DisplayTestCase {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- class C { }
|
|
|
- i{-1-}
|
|
|
+ class C { }
|
|
|
+ i{-1-}
|
|
|
**/
|
|
|
function testAfterClassIdent() {
|
|
|
var fields = toplevel(pos(1));
|
|
|
- for (expected in ["private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"]) {
|
|
|
+ for (expected in [
|
|
|
+ "private",
|
|
|
+ "extern",
|
|
|
+ "class",
|
|
|
+ "interface",
|
|
|
+ "enum",
|
|
|
+ "abstract",
|
|
|
+ "typedef",
|
|
|
+ "final"
|
|
|
+ ]) {
|
|
|
eq(true, hasField(fields, expected, null, "keyword"));
|
|
|
}
|
|
|
for (unexpected in ["import", "using", "package"]) {
|
|
@@ -82,19 +108,21 @@ class Issue7053 extends DisplayTestCase {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- {-1-}class
|
|
|
+ {-1-}class
|
|
|
**/
|
|
|
function testOnClass() {
|
|
|
var fields = toplevel(pos(1));
|
|
|
// technically, "package" should be here too. But I think the test system adds a
|
|
|
// package statement automatically, so it is omitted.
|
|
|
- for (expected in ["import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"]) {
|
|
|
+ for (expected in [
|
|
|
+ "import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"
|
|
|
+ ]) {
|
|
|
eq(true, hasField(fields, expected, null, "keyword"));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- private {-1-}
|
|
|
+ private {-1-}
|
|
|
**/
|
|
|
function testAfterPrivate() {
|
|
|
var fields = toplevel(pos(1));
|
|
@@ -107,7 +135,7 @@ class Issue7053 extends DisplayTestCase {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- extern {-1-}
|
|
|
+ extern {-1-}
|
|
|
**/
|
|
|
function testAFterExtern() {
|
|
|
var fields = toplevel(pos(1));
|
|
@@ -120,7 +148,7 @@ class Issue7053 extends DisplayTestCase {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- final {-1-}
|
|
|
+ final {-1-}
|
|
|
**/
|
|
|
function testAFterFinal() {
|
|
|
var fields = toplevel(pos(1));
|
|
@@ -133,7 +161,7 @@ class Issue7053 extends DisplayTestCase {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- final extern {-1-}
|
|
|
+ final extern {-1-}
|
|
|
**/
|
|
|
function testAFterFinalExtern() {
|
|
|
var fields = toplevel(pos(1));
|
|
@@ -146,7 +174,7 @@ class Issue7053 extends DisplayTestCase {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- {-1-}
|
|
|
+ {-1-}
|
|
|
**/
|
|
|
@:filename("import.hx")
|
|
|
function testInImportHx() {
|
|
@@ -157,4 +185,4 @@ class Issue7053 extends DisplayTestCase {
|
|
|
}
|
|
|
eq(expectedKeywords.length, keywords.length);
|
|
|
}
|
|
|
-}
|
|
|
+}
|