OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, the Dart project authors. | 2 * Copyright (c) 2013, the Dart project authors. |
3 * | 3 * |
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
6 * | 6 * |
7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
8 * | 8 * |
9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
(...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1474 } | 1474 } |
1475 | 1475 |
1476 public void testCommentSnippets090() throws Exception { | 1476 public void testCommentSnippets090() throws Exception { |
1477 test("class X { f() { var a = 'x'; a.!1 }}", "1+length"); | 1477 test("class X { f() { var a = 'x'; a.!1 }}", "1+length"); |
1478 } | 1478 } |
1479 | 1479 |
1480 public void testCompletion_alias_field() throws Exception { | 1480 public void testCompletion_alias_field() throws Exception { |
1481 test("typedef int fnint(int k); fn!1int x;", "1+fnint"); | 1481 test("typedef int fnint(int k); fn!1int x;", "1+fnint"); |
1482 } | 1482 } |
1483 | 1483 |
| 1484 public void testCompletion_arguments_ignoreEmpty() throws Exception { |
| 1485 test(src(// |
| 1486 "class A {", |
| 1487 " test() {}", |
| 1488 "}", |
| 1489 "main(A a) {", |
| 1490 " a.test(!1);", |
| 1491 "}"), "1-test"); |
| 1492 } |
| 1493 |
1484 public void testCompletion_as_asIdentifierPrefix() throws Exception { | 1494 public void testCompletion_as_asIdentifierPrefix() throws Exception { |
1485 test(src(// | 1495 test(src(// |
1486 "main(p) {", | 1496 "main(p) {", |
1487 " var asVisible;", | 1497 " var asVisible;", |
1488 " var v = as!1;", | 1498 " var v = as!1;", |
1489 "}"), "1+asVisible"); | 1499 "}"), "1+asVisible"); |
1490 } | 1500 } |
1491 | 1501 |
1492 public void testCompletion_as_asPrefixedIdentifierStart() throws Exception { | 1502 public void testCompletion_as_asPrefixedIdentifierStart() throws Exception { |
1493 test(src(// | 1503 test(src(// |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1530 } | 1540 } |
1531 | 1541 |
1532 public void testCompletion_combinator_usePrefix() throws Exception { | 1542 public void testCompletion_combinator_usePrefix() throws Exception { |
1533 test("import 'dart:math' show s!1", "1+sin", "1+sqrt", "1-cos", "1-String"); | 1543 test("import 'dart:math' show s!1", "1+sin", "1+sqrt", "1-cos", "1-String"); |
1534 } | 1544 } |
1535 | 1545 |
1536 public void testCompletion_constructor_field() throws Exception { | 1546 public void testCompletion_constructor_field() throws Exception { |
1537 test("class X { X(this.field); int f!1ield;}", "1+field"); | 1547 test("class X { X(this.field); int f!1ield;}", "1+field"); |
1538 } | 1548 } |
1539 | 1549 |
| 1550 public void testCompletion_constructorArguments_showOnlyCurrent() throws Excep
tion { |
| 1551 test(src(// |
| 1552 "class A {", |
| 1553 " A.first(int p);", |
| 1554 " A.second(double p);", |
| 1555 "}", |
| 1556 "main() {", |
| 1557 " new A.first(!1);", |
| 1558 "}"), "1+A.first", "1-A.second"); |
| 1559 } |
| 1560 |
1540 public void testCompletion_double_inFractionPart() throws Exception { | 1561 public void testCompletion_double_inFractionPart() throws Exception { |
1541 test(src(// | 1562 test(src(// |
1542 "main() {", | 1563 "main() {", |
1543 " 1.0!1", | 1564 " 1.0!1", |
1544 "}"), "1-abs", "1-main"); | 1565 "}"), "1-abs", "1-main"); |
1545 } | 1566 } |
1546 | 1567 |
1547 public void testCompletion_export_dart() throws Exception { | 1568 public void testCompletion_export_dart() throws Exception { |
1548 test( | 1569 test( |
1549 src(// | 1570 src(// |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1885 public void testCompletion_while() throws Exception { | 1906 public void testCompletion_while() throws Exception { |
1886 test("class Foo { int boo = 7; mth() { while (b!1) {} }}", "1+boo"); | 1907 test("class Foo { int boo = 7; mth() { while (b!1) {} }}", "1+boo"); |
1887 } | 1908 } |
1888 | 1909 |
1889 // TODO Improve proposals for optional params. | 1910 // TODO Improve proposals for optional params. |
1890 public void testSingle() throws Exception { | 1911 public void testSingle() throws Exception { |
1891 test("class A {int x; !2mth() {int y = this.x;}}class B{}", "2+B"); | 1912 test("class A {int x; !2mth() {int y = this.x;}}class B{}", "2+B"); |
1892 } | 1913 } |
1893 | 1914 |
1894 } | 1915 } |
OLD | NEW |