Removing TypeCheck enabling from CheckInterfacesTest of the LINTCHECKS pass-- should be turned on after transpilation. Part of verification/adding of ES6 module compatibility to compiler.
@@ -39,11 +39,6 @@ public final class CheckInterfacesTest extends CompilerTestCase {
return options;
}
- protected void setUp() throws Exception {
- super.setUp();
- enableTypeCheck();
- }
-
public void testInterfaceArgs() throws Exception {
testSame("/** @interface */ function A(x) {}",
CheckInterfaces.INTERFACE_SHOULD_NOT_TAKE_ARGS);
@@ -54,6 +49,12 @@ public final class CheckInterfacesTest extends CompilerTestCase {
CheckInterfaces.INTERFACE_SHOULD_NOT_TAKE_ARGS);
}
+ public void testInterfaceArgs_withES6Modules() throws Exception {
+ testSame(
+ "export /** @interface */ function A(x) {}",
+ CheckInterfaces.INTERFACE_SHOULD_NOT_TAKE_ARGS);
+ }
+
public void testInterfaceNotEmpty() {
testSame("/** @interface */ function A() { this.foo; }",
CheckInterfaces.INTERFACE_FUNCTION_NOT_EMPTY);
@@ -65,4 +66,10 @@ public final class CheckInterfacesTest extends CompilerTestCase {
"ns.SomeInterface = function() { this.foo; };"),
CheckInterfaces.INTERFACE_FUNCTION_NOT_EMPTY);
}
+
+ public void testInterfaceNotEmpty_withES6Modules() {
+ testSame(
+ "export /** @interface */ function A() { this.foo; }",
+ CheckInterfaces.INTERFACE_FUNCTION_NOT_EMPTY);
+ }
}
