added test cases for @Root (required test packages refactoring)
@ -169,7 +169,7 @@ public class JSweetContext extends Context {
|
||||
* Stores the root package namee (i.e. packages contained in the default
|
||||
* package or in a package annotated with the {@link jsweet.lang.Root} annotation).
|
||||
*/
|
||||
public Set<String> rootPackageNames = new HashSet<>();
|
||||
public Set<String> topLevelPackageNames = new HashSet<>();
|
||||
|
||||
/**
|
||||
* Globally imported name (in the global namespace).
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
*/
|
||||
package org.jsweet.transpiler;
|
||||
|
||||
/**
|
||||
@ -240,7 +240,15 @@ public enum JSweetProblem {
|
||||
/**
|
||||
* Raised when a wildcard import is used.
|
||||
*/
|
||||
WILDCARD_IMPORT(Severity.ERROR);
|
||||
WILDCARD_IMPORT(Severity.ERROR),
|
||||
/**
|
||||
* Raised when a @Root package is enclosed in a @Root package.
|
||||
*/
|
||||
ENCLOSED_ROOT_PACKAGES(Severity.ERROR),
|
||||
/**
|
||||
* Raised when a class is declared in a parent of a @Root package.
|
||||
*/
|
||||
CLASS_OUT_OF_ROOT_PACKAGE_SCOPE(Severity.ERROR);
|
||||
|
||||
private Severity severity;
|
||||
|
||||
@ -261,7 +269,9 @@ public enum JSweetProblem {
|
||||
public String getMessage(Object... params) {
|
||||
switch (this) {
|
||||
case JAVA_COMPILER_NOT_FOUND:
|
||||
return String.format("Java compiler cannot be found: make sure that JAVA_HOME points to a JDK (version>=8) and not a JRE, or sets the transpiler jdkHome option", params);
|
||||
return String.format(
|
||||
"Java compiler cannot be found: make sure that JAVA_HOME points to a JDK (version>=8) and not a JRE, or sets the transpiler jdkHome option",
|
||||
params);
|
||||
case JAVA_ERRORS:
|
||||
return String.format("Java compiler reports %s error(s) that should be fixed before transpiling", params);
|
||||
case INTERNAL_TSC_ERROR:
|
||||
@ -360,6 +370,10 @@ public enum JSweetProblem {
|
||||
return String.format("a package name cannot contain top-level keyword(s): %s", params);
|
||||
case WILDCARD_IMPORT:
|
||||
return String.format("imports cannot use * wildcards: please import a specific element", params);
|
||||
case ENCLOSED_ROOT_PACKAGES:
|
||||
return String.format("invalid package hierarchy: @Root package %s cannot be enclosed in @Root package %s", params);
|
||||
case CLASS_OUT_OF_ROOT_PACKAGE_SCOPE:
|
||||
return String.format("invalid package hierarchy: type %s is declared in a parent of @Root package %s", params);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -673,7 +673,7 @@ public class JSweetTranspiler {
|
||||
createModuleFile = false;
|
||||
// create only auxiliary module files on modules within a root
|
||||
// package
|
||||
for (String roots : context.rootPackageNames) {
|
||||
for (String roots : context.topLevelPackageNames) {
|
||||
File root = new File(tsOutputDir, roots.replace('.', File.separatorChar));
|
||||
if (rootDir.getPath().startsWith(root.getPath())) {
|
||||
createModuleFile = true;
|
||||
|
||||
@ -146,7 +146,7 @@ public class Java2TypeScriptTranslator extends AbstractTreePrinter {
|
||||
|
||||
private boolean globalModule = false;
|
||||
|
||||
private PackageSymbol rootPackage;
|
||||
private PackageSymbol topLevelPackage;
|
||||
|
||||
private void useModule(PackageSymbol targetPackage, JCTree sourceTree, String targetName, String moduleName) {
|
||||
if (context.useModules) {
|
||||
@ -164,12 +164,34 @@ public class Java2TypeScriptTranslator extends AbstractTreePrinter {
|
||||
}
|
||||
}
|
||||
|
||||
private void checkRootPackageParent(JCCompilationUnit topLevel, PackageSymbol rootPackage, PackageSymbol parentPackage) {
|
||||
if (parentPackage == null) {
|
||||
return;
|
||||
}
|
||||
if (Util.hasAnnotationType(parentPackage, JSweetConfig.ANNOTATION_ROOT)) {
|
||||
report(topLevel.getPackageName(), JSweetProblem.ENCLOSED_ROOT_PACKAGES, rootPackage.getQualifiedName().toString(),
|
||||
parentPackage.getQualifiedName().toString());
|
||||
}
|
||||
for (Symbol s : parentPackage.getEnclosedElements()) {
|
||||
if (!(s instanceof PackageSymbol)) {
|
||||
report(topLevel.getPackageName(), JSweetProblem.CLASS_OUT_OF_ROOT_PACKAGE_SCOPE, s.getQualifiedName().toString(),
|
||||
rootPackage.getQualifiedName().toString());
|
||||
}
|
||||
}
|
||||
checkRootPackageParent(topLevel, rootPackage, (PackageSymbol)parentPackage.owner);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitTopLevel(JCCompilationUnit topLevel) {
|
||||
printIndent().print("\"Generated from Java with JSweet " + JSweetConfig.getVersionNumber() + " - http://www.jsweet.org\";").println();
|
||||
rootPackage = Util.getRootPackage(topLevel.packge);
|
||||
PackageSymbol rootPackage = Util.getFirstEnclosingRootPackage(topLevel.packge);
|
||||
if (rootPackage != null) {
|
||||
context.rootPackageNames.add(rootPackage.getQualifiedName().toString());
|
||||
checkRootPackageParent(topLevel, rootPackage, (PackageSymbol)rootPackage.owner);
|
||||
}
|
||||
|
||||
topLevelPackage = Util.getTopLevelPackage(topLevel.packge);
|
||||
if (topLevelPackage != null) {
|
||||
context.topLevelPackageNames.add(topLevelPackage.getQualifiedName().toString());
|
||||
}
|
||||
|
||||
footer.delete(0, footer.length());
|
||||
@ -279,7 +301,7 @@ public class Java2TypeScriptTranslator extends AbstractTreePrinter {
|
||||
if (qualified.sym instanceof ClassSymbol) {
|
||||
ClassSymbol importedClass = (ClassSymbol) qualified.sym;
|
||||
if (Util.isSourceType(importedClass)) {
|
||||
PackageSymbol targetRootPackage = Util.getRootPackage(importedClass);
|
||||
PackageSymbol targetRootPackage = Util.getTopLevelPackage(importedClass);
|
||||
if (targetRootPackage == null) {
|
||||
continue;
|
||||
}
|
||||
@ -882,7 +904,7 @@ public class Java2TypeScriptTranslator extends AbstractTreePrinter {
|
||||
public void visitImport(JCImport importDecl) {
|
||||
imports.add(importDecl);
|
||||
String qualId = importDecl.getQualifiedIdentifier().toString();
|
||||
if (qualId.endsWith("*")) {
|
||||
if (qualId.endsWith("*") && !qualId.endsWith("." + JSweetConfig.GLOBALS_CLASS_NAME + ".*")) {
|
||||
report(importDecl, JSweetProblem.WILDCARD_IMPORT);
|
||||
return;
|
||||
}
|
||||
@ -897,7 +919,7 @@ public class Java2TypeScriptTranslator extends AbstractTreePrinter {
|
||||
context.registerImportedName(compilationUnit.packge, name);
|
||||
}
|
||||
} else {
|
||||
if (rootPackage == null) {
|
||||
if (topLevelPackage == null) {
|
||||
if (context.globalImports.contains(name)) {
|
||||
// Tsc global package does allow multiple import with
|
||||
// the same name in the global namespace (bug?)
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
*/
|
||||
package org.jsweet.transpiler.util;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
@ -385,10 +385,12 @@ public class Util {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets root package (see <code>jsweet.lang.Root</code>) enclosing the given
|
||||
* symbol.
|
||||
* Gets the top-level package enclosing the given symbol. The top-level
|
||||
* package is the one that is enclosed within a root package (see
|
||||
* <code>jsweet.lang.Root</code>) or the one in the default (unnamed)
|
||||
* package.
|
||||
*/
|
||||
public static PackageSymbol getRootPackage(Symbol symbol) {
|
||||
public static PackageSymbol getTopLevelPackage(Symbol symbol) {
|
||||
if ((symbol instanceof PackageSymbol) && Util.hasAnnotationType(symbol, JSweetConfig.ANNOTATION_ROOT)) {
|
||||
return null;
|
||||
}
|
||||
@ -407,11 +409,25 @@ public class Util {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return getRootPackage(parent);
|
||||
return getTopLevelPackage(parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the first (including itself) enclosing package annotated
|
||||
* with @Root.
|
||||
*/
|
||||
public static PackageSymbol getFirstEnclosingRootPackage(PackageSymbol packageSymbol) {
|
||||
if (packageSymbol == null) {
|
||||
return null;
|
||||
}
|
||||
if (Util.hasAnnotationType(packageSymbol, JSweetConfig.ANNOTATION_ROOT)) {
|
||||
return packageSymbol;
|
||||
}
|
||||
return getFirstEnclosingRootPackage((PackageSymbol) packageSymbol.owner);
|
||||
}
|
||||
|
||||
private static void getRootRelativeJavaName(StringBuilder sb, Symbol symbol) {
|
||||
if (!Util.hasAnnotationType(symbol, JSweetConfig.ANNOTATION_ROOT)) {
|
||||
if (sb.length() > 0 && !"".equals(symbol.toString())) {
|
||||
@ -695,7 +711,9 @@ public class Util {
|
||||
|
||||
/**
|
||||
* Removes the extensions of the given file name.
|
||||
* @param fileName the given file name (can contain path)
|
||||
*
|
||||
* @param fileName
|
||||
* the given file name (can contain path)
|
||||
* @return the file name without the extension
|
||||
*/
|
||||
public static String removeExtension(String fileName) {
|
||||
|
||||
@ -17,23 +17,24 @@ package org.jsweet.test.transpiler;
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.jsweet.test.transpiler.source.ambient.LibAccess;
|
||||
import org.jsweet.test.transpiler.source.ambient.LibAccessSubModule;
|
||||
import org.jsweet.test.transpiler.source.ambient.lib.Base;
|
||||
import org.jsweet.test.transpiler.source.ambient.lib.Extension;
|
||||
import org.jsweet.test.transpiler.source.ambient.lib.sub.C;
|
||||
import org.jsweet.transpiler.ModuleKind;
|
||||
import org.jsweet.transpiler.SourceFile;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import source.ambient.LibAccess;
|
||||
import source.ambient.LibAccessSubModule;
|
||||
import source.ambient.lib.Base;
|
||||
import source.ambient.lib.Extension;
|
||||
import source.ambient.lib.sub.C;
|
||||
|
||||
public class AmbientTests extends AbstractTest {
|
||||
|
||||
@Test
|
||||
public void testLibAccess() throws Exception {
|
||||
File target = new File(transpiler.getTsOutputDir(), "lib.js");
|
||||
FileUtils.deleteQuietly(target);
|
||||
FileUtils.copyFile(new File(TEST_DIRECTORY_NAME + "/org/jsweet/test/transpiler/source/ambient/lib.js"), target);
|
||||
FileUtils.copyFile(new File(TEST_DIRECTORY_NAME + "/source/ambient/lib.js"), target);
|
||||
System.out.println("copied to " + target);
|
||||
|
||||
SourceFile libJs = new SourceFile(null) {
|
||||
@ -63,7 +64,7 @@ public class AmbientTests extends AbstractTest {
|
||||
public void testLibAccessSubModule() throws Exception {
|
||||
File target = new File(transpiler.getTsOutputDir(), "libsub.js");
|
||||
FileUtils.deleteQuietly(target);
|
||||
FileUtils.copyFile(new File(TEST_DIRECTORY_NAME + "/org/jsweet/test/transpiler/source/ambient/libsub.js"), target);
|
||||
FileUtils.copyFile(new File(TEST_DIRECTORY_NAME + "/source/ambient/libsub.js"), target);
|
||||
System.out.println("copied to " + target);
|
||||
|
||||
SourceFile libJs = new SourceFile(null) {
|
||||
|
||||
@ -16,16 +16,17 @@ package org.jsweet.test.transpiler;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.jsweet.test.transpiler.source.api.CastMethods;
|
||||
import org.jsweet.test.transpiler.source.api.ForeachIteration;
|
||||
import org.jsweet.test.transpiler.source.api.JdkInvocations;
|
||||
import org.jsweet.test.transpiler.source.api.PrimitiveInstantiation;
|
||||
import org.jsweet.test.transpiler.source.api.QualifiedInstantiation;
|
||||
import org.jsweet.test.transpiler.source.api.WrongJdkInvocations;
|
||||
import org.jsweet.transpiler.JSweetProblem;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import source.api.CastMethods;
|
||||
import source.api.ForeachIteration;
|
||||
import source.api.JdkInvocations;
|
||||
import source.api.PrimitiveInstantiation;
|
||||
import source.api.QualifiedInstantiation;
|
||||
import source.api.WrongJdkInvocations;
|
||||
|
||||
public class ApiTests extends AbstractTest {
|
||||
|
||||
@Test
|
||||
|
||||
@ -16,14 +16,15 @@ package org.jsweet.test.transpiler;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.jsweet.test.transpiler.source.candies.Angular;
|
||||
import org.jsweet.test.transpiler.source.candies.ExpressLib;
|
||||
import org.jsweet.test.transpiler.source.candies.GlobalsImport;
|
||||
import org.jsweet.test.transpiler.source.candies.JQuery;
|
||||
import org.jsweet.test.transpiler.source.candies.QualifiedNames;
|
||||
import org.jsweet.transpiler.ModuleKind;
|
||||
import org.junit.Test;
|
||||
|
||||
import source.candies.Angular;
|
||||
import source.candies.ExpressLib;
|
||||
import source.candies.GlobalsImport;
|
||||
import source.candies.JQuery;
|
||||
import source.candies.QualifiedNames;
|
||||
|
||||
public class CandiesTests extends AbstractTest {
|
||||
|
||||
@Test
|
||||
|
||||
@ -16,9 +16,10 @@ package org.jsweet.test.transpiler;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.jsweet.test.transpiler.source.generics.InstantiationWithGenerics;
|
||||
import org.junit.Test;
|
||||
|
||||
import source.generics.InstantiationWithGenerics;
|
||||
|
||||
public class GenericsTests extends AbstractTest {
|
||||
|
||||
@Test
|
||||
|
||||
@ -19,25 +19,26 @@ import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import org.jsweet.test.transpiler.source.init.Constructor;
|
||||
import org.jsweet.test.transpiler.source.init.ConstructorField;
|
||||
import org.jsweet.test.transpiler.source.init.ConstructorFieldInInterface;
|
||||
import org.jsweet.test.transpiler.source.init.ConstructorMethod;
|
||||
import org.jsweet.test.transpiler.source.init.ConstructorMethodInInterface;
|
||||
import org.jsweet.test.transpiler.source.init.Initializer;
|
||||
import org.jsweet.test.transpiler.source.init.InitializerStatementConditionError;
|
||||
import org.jsweet.test.transpiler.source.init.InitializerStatementError;
|
||||
import org.jsweet.test.transpiler.source.init.InterfaceRawConstruction;
|
||||
import org.jsweet.test.transpiler.source.init.MultipleMains;
|
||||
import org.jsweet.test.transpiler.source.init.NoOptionalFieldsInClass;
|
||||
import org.jsweet.test.transpiler.source.init.StaticInitializer;
|
||||
import org.jsweet.test.transpiler.source.structural.OptionalField;
|
||||
import org.jsweet.test.transpiler.source.structural.OptionalFieldError;
|
||||
import org.jsweet.transpiler.JSweetProblem;
|
||||
import org.jsweet.transpiler.util.EvaluationResult;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import source.init.Constructor;
|
||||
import source.init.ConstructorField;
|
||||
import source.init.ConstructorFieldInInterface;
|
||||
import source.init.ConstructorMethod;
|
||||
import source.init.ConstructorMethodInInterface;
|
||||
import source.init.Initializer;
|
||||
import source.init.InitializerStatementConditionError;
|
||||
import source.init.InitializerStatementError;
|
||||
import source.init.InterfaceRawConstruction;
|
||||
import source.init.MultipleMains;
|
||||
import source.init.NoOptionalFieldsInClass;
|
||||
import source.init.StaticInitializer;
|
||||
import source.structural.OptionalField;
|
||||
import source.structural.OptionalFieldError;
|
||||
|
||||
public class InitTests extends AbstractTest {
|
||||
|
||||
@Test
|
||||
|
||||
@ -17,13 +17,14 @@ package org.jsweet.test.transpiler;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import org.jsweet.test.transpiler.source.overload.Overload;
|
||||
import org.jsweet.test.transpiler.source.overload.WrongOverload;
|
||||
import org.jsweet.test.transpiler.source.overload.WrongOverloads;
|
||||
import org.jsweet.transpiler.JSweetProblem;
|
||||
import org.jsweet.transpiler.util.EvaluationResult;
|
||||
import org.junit.Test;
|
||||
|
||||
import source.overload.Overload;
|
||||
import source.overload.WrongOverload;
|
||||
import source.overload.WrongOverloads;
|
||||
|
||||
public class OverloadTests extends AbstractTest {
|
||||
|
||||
@Test
|
||||
|
||||
@ -17,34 +17,35 @@ package org.jsweet.test.transpiler;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.jsweet.test.transpiler.source.blocksgame.Ball;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.BlockElement;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.Factory;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.GameArea;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.GameManager;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.Globals;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.Player;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.AnimatedElement;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Collisions;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Direction;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Line;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.MobileElement;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Point;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Rectangle;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Vector;
|
||||
import org.jsweet.test.transpiler.source.require.TopLevel1;
|
||||
import org.jsweet.test.transpiler.source.require.TopLevel2;
|
||||
import org.jsweet.test.transpiler.source.require.a.A;
|
||||
import org.jsweet.test.transpiler.source.require.a.Use1;
|
||||
import org.jsweet.test.transpiler.source.require.a.Use2;
|
||||
import org.jsweet.test.transpiler.source.require.a.b.B1;
|
||||
import org.jsweet.test.transpiler.source.require.a.b.B2;
|
||||
import org.jsweet.test.transpiler.source.require.b.ClassImport;
|
||||
import org.jsweet.test.transpiler.source.require.b.ClassImportImplicitRequire;
|
||||
import org.jsweet.test.transpiler.source.require.b.GlobalsImport;
|
||||
import org.jsweet.transpiler.ModuleKind;
|
||||
import org.junit.Test;
|
||||
|
||||
import source.blocksgame.Ball;
|
||||
import source.blocksgame.BlockElement;
|
||||
import source.blocksgame.Factory;
|
||||
import source.blocksgame.GameArea;
|
||||
import source.blocksgame.GameManager;
|
||||
import source.blocksgame.Globals;
|
||||
import source.blocksgame.Player;
|
||||
import source.blocksgame.util.AnimatedElement;
|
||||
import source.blocksgame.util.Collisions;
|
||||
import source.blocksgame.util.Direction;
|
||||
import source.blocksgame.util.Line;
|
||||
import source.blocksgame.util.MobileElement;
|
||||
import source.blocksgame.util.Point;
|
||||
import source.blocksgame.util.Rectangle;
|
||||
import source.blocksgame.util.Vector;
|
||||
import source.require.TopLevel1;
|
||||
import source.require.TopLevel2;
|
||||
import source.require.a.A;
|
||||
import source.require.a.Use1;
|
||||
import source.require.a.Use2;
|
||||
import source.require.a.b.B1;
|
||||
import source.require.a.b.B2;
|
||||
import source.require.b.ClassImport;
|
||||
import source.require.b.ClassImportImplicitRequire;
|
||||
import source.require.b.GlobalsImport;
|
||||
|
||||
public class RequireTests extends AbstractTest {
|
||||
|
||||
@Test
|
||||
@ -81,7 +82,7 @@ public class RequireTests extends AbstractTest {
|
||||
public void testGlobalsImport() {
|
||||
transpile(logHandler -> {
|
||||
assertEquals("There should be no errors", 0, logHandler.reportedProblems.size());
|
||||
} , getSourceFile(org.jsweet.test.transpiler.source.require.globals.Globals.class), getSourceFile(GlobalsImport.class));
|
||||
} , getSourceFile(source.require.globals.Globals.class), getSourceFile(GlobalsImport.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
63
src/test/java/org/jsweet/test/transpiler/RootTests.java
Normal file
@ -0,0 +1,63 @@
|
||||
/* Copyright 2015 CINCHEO SAS
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.jsweet.transpiler.JSweetProblem;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import source.root.noroot.a.GlobalsInNoRoot;
|
||||
import source.root.root.a.GlobalsInRoot;
|
||||
import source.root.rootparent1.InvalidClassLocation;
|
||||
import source.root.rootparent1.root.NoClassesInRootParent;
|
||||
import source.root.rootparent2.root.NoRootInRoot;
|
||||
|
||||
public class RootTests extends AbstractTest {
|
||||
|
||||
@Test
|
||||
public void testGlobalsInRoot() {
|
||||
eval((logHandler, r) -> {
|
||||
assertEquals("There should be no errors", 0, logHandler.reportedProblems.size());
|
||||
Assert.assertEquals(true, r.get("m1"));
|
||||
Assert.assertEquals(true, r.get("m2"));
|
||||
} , getSourceFile(GlobalsInRoot.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGlobalsInNoRoot() {
|
||||
eval((logHandler, r) -> {
|
||||
assertEquals("There should be no errors", 0, logHandler.reportedProblems.size());
|
||||
Assert.assertEquals(true, r.get("m1"));
|
||||
Assert.assertEquals(true, r.get("m2"));
|
||||
} , getSourceFile(GlobalsInNoRoot.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNoClassesInRootParent() {
|
||||
transpile((logHandler) -> {
|
||||
logHandler.assertReportedProblems(JSweetProblem.CLASS_OUT_OF_ROOT_PACKAGE_SCOPE);
|
||||
} , getSourceFile(InvalidClassLocation.class), getSourceFile(NoClassesInRootParent.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNoRootInRoot() {
|
||||
transpile((logHandler) -> {
|
||||
logHandler.assertReportedProblems(JSweetProblem.ENCLOSED_ROOT_PACKAGES);
|
||||
} , getSourceFile(NoRootInRoot.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -22,38 +22,38 @@ import static org.jsweet.transpiler.JSweetProblem.GLOBAL_INDEXER_SET;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.jsweet.test.transpiler.source.structural.AbstractClass;
|
||||
import org.jsweet.test.transpiler.source.structural.AutoImportClassesInSamePackage;
|
||||
import org.jsweet.test.transpiler.source.structural.AutoImportClassesInSamePackageUsed;
|
||||
import org.jsweet.test.transpiler.source.structural.Enums;
|
||||
import org.jsweet.test.transpiler.source.structural.ExtendsClassInSameFile;
|
||||
import org.jsweet.test.transpiler.source.structural.ExtendsObject;
|
||||
import org.jsweet.test.transpiler.source.structural.GlobalsAccess;
|
||||
import org.jsweet.test.transpiler.source.structural.Inheritance;
|
||||
import org.jsweet.test.transpiler.source.structural.InnerClass;
|
||||
import org.jsweet.test.transpiler.source.structural.NameClashes;
|
||||
import org.jsweet.test.transpiler.source.structural.NoInstanceofForInterfaces;
|
||||
import org.jsweet.test.transpiler.source.structural.NoWildcardsInImports;
|
||||
import org.jsweet.test.transpiler.source.structural.TwoClassesInSameFile;
|
||||
import org.jsweet.test.transpiler.source.structural.WrongConstructsInEnums;
|
||||
import org.jsweet.test.transpiler.source.structural.WrongConstructsInInterfaces;
|
||||
import org.jsweet.test.transpiler.source.structural.globalclasses.Globals;
|
||||
import org.jsweet.test.transpiler.source.structural.globalclasses.a.GlobalsConstructor;
|
||||
import org.jsweet.test.transpiler.source.structural.globalclasses.b.GlobalFunctionStaticGetSet;
|
||||
import org.jsweet.test.transpiler.source.structural.globalclasses.c.GlobalFunctionGetSet;
|
||||
import org.jsweet.test.transpiler.source.structural.globalclasses.d.GlobalFunctionAccessFromMain;
|
||||
import org.jsweet.test.transpiler.source.structural.globalclasses.f.GlobalFunctionStaticDelete;
|
||||
import org.jsweet.test.transpiler.source.structural.globalclasses.g.GlobalFunctionDelete;
|
||||
import org.jsweet.test.transpiler.source.structural.globalclasses.noroot.a.GlobalsInNoRoot;
|
||||
import org.jsweet.test.transpiler.source.structural.globalclasses.root.a.GlobalsInRoot;
|
||||
import org.jsweet.test.transpiler.source.structural.rootparent1.InvalidClassLocation;
|
||||
import org.jsweet.test.transpiler.source.structural.rootparent1.root.NoClassesInRootParent;
|
||||
import org.jsweet.test.transpiler.source.structural.rootparent2.root.NoRootInRoot;
|
||||
import org.jsweet.transpiler.JSweetProblem;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import source.root.noroot.a.GlobalsInNoRoot;
|
||||
import source.root.root.a.GlobalsInRoot;
|
||||
import source.root.rootparent1.InvalidClassLocation;
|
||||
import source.root.rootparent1.root.NoClassesInRootParent;
|
||||
import source.root.rootparent2.root.NoRootInRoot;
|
||||
import source.structural.AbstractClass;
|
||||
import source.structural.AutoImportClassesInSamePackage;
|
||||
import source.structural.AutoImportClassesInSamePackageUsed;
|
||||
import source.structural.Enums;
|
||||
import source.structural.ExtendsClassInSameFile;
|
||||
import source.structural.ExtendsObject;
|
||||
import source.structural.GlobalsAccess;
|
||||
import source.structural.Inheritance;
|
||||
import source.structural.InnerClass;
|
||||
import source.structural.NameClashes;
|
||||
import source.structural.NoInstanceofForInterfaces;
|
||||
import source.structural.NoWildcardsInImports;
|
||||
import source.structural.TwoClassesInSameFile;
|
||||
import source.structural.WrongConstructsInEnums;
|
||||
import source.structural.WrongConstructsInInterfaces;
|
||||
import source.structural.globalclasses.Globals;
|
||||
import source.structural.globalclasses.a.GlobalsConstructor;
|
||||
import source.structural.globalclasses.b.GlobalFunctionStaticGetSet;
|
||||
import source.structural.globalclasses.c.GlobalFunctionGetSet;
|
||||
import source.structural.globalclasses.d.GlobalFunctionAccessFromMain;
|
||||
import source.structural.globalclasses.f.GlobalFunctionStaticDelete;
|
||||
import source.structural.globalclasses.g.GlobalFunctionDelete;
|
||||
|
||||
public class StructuralTests extends AbstractTest {
|
||||
|
||||
@Test
|
||||
@ -205,48 +205,14 @@ public class StructuralTests extends AbstractTest {
|
||||
Assert.assertEquals("invoked", r.get("test"));
|
||||
Assert.assertEquals("invoked1_2", r.get("Static"));
|
||||
Assert.assertEquals("invoked1_2", r.get("test2"));
|
||||
} , getSourceFile(Globals.class), getSourceFile(org.jsweet.test.transpiler.source.structural.globalclasses.e.Globals.class),
|
||||
} , getSourceFile(Globals.class), getSourceFile(source.structural.globalclasses.e.Globals.class),
|
||||
getSourceFile(GlobalFunctionAccessFromMain.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGlobalsInRoot() {
|
||||
eval((logHandler, r) -> {
|
||||
assertEquals("There should be no errors", 0, logHandler.reportedProblems.size());
|
||||
Assert.assertEquals(true, r.get("m1"));
|
||||
Assert.assertEquals(true, r.get("m2"));
|
||||
} , getSourceFile(GlobalsInRoot.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGlobalsInNoRoot() {
|
||||
eval((logHandler, r) -> {
|
||||
assertEquals("There should be no errors", 0, logHandler.reportedProblems.size());
|
||||
Assert.assertEquals(true, r.get("m1"));
|
||||
Assert.assertEquals(true, r.get("m2"));
|
||||
} , getSourceFile(GlobalsInNoRoot.class));
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void testNoClassesInRootParent() {
|
||||
transpile((logHandler) -> {
|
||||
assertEquals(1, logHandler.reportedProblems.size());
|
||||
} , getSourceFile(InvalidClassLocation.class), getSourceFile(NoClassesInRootParent.class));
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void testNoRootInRoot() {
|
||||
transpile((logHandler) -> {
|
||||
assertEquals(1, logHandler.reportedProblems.size());
|
||||
} , getSourceFile(NoRootInRoot.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWildcardsInImports() {
|
||||
transpile((logHandler) -> {
|
||||
logHandler.assertReportedProblems(JSweetProblem.WILDCARD_IMPORT, JSweetProblem.WILDCARD_IMPORT);
|
||||
logHandler.assertReportedProblems(JSweetProblem.WILDCARD_IMPORT);
|
||||
} , getSourceFile(NoWildcardsInImports.class));
|
||||
}
|
||||
|
||||
|
||||
@ -18,22 +18,23 @@ import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import org.jsweet.test.transpiler.source.syntax.AnnotationQualifiedNames;
|
||||
import org.jsweet.test.transpiler.source.syntax.FinalVariables;
|
||||
import org.jsweet.test.transpiler.source.syntax.FinalVariablesRuntime;
|
||||
import org.jsweet.test.transpiler.source.syntax.GlobalsInvocation;
|
||||
import org.jsweet.test.transpiler.source.syntax.IndexedAccessInStaticScope;
|
||||
import org.jsweet.test.transpiler.source.syntax.Keywords;
|
||||
import org.jsweet.test.transpiler.source.syntax.Labels;
|
||||
import org.jsweet.test.transpiler.source.syntax.QualifiedNames;
|
||||
import org.jsweet.test.transpiler.source.syntax.References;
|
||||
import org.jsweet.test.transpiler.source.syntax.SpecialFunctions;
|
||||
import org.jsweet.test.transpiler.source.syntax.ValidIndexedAccesses;
|
||||
import org.jsweet.transpiler.JSweetProblem;
|
||||
import org.jsweet.transpiler.util.EvaluationResult;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import source.syntax.AnnotationQualifiedNames;
|
||||
import source.syntax.FinalVariables;
|
||||
import source.syntax.FinalVariablesRuntime;
|
||||
import source.syntax.GlobalsInvocation;
|
||||
import source.syntax.IndexedAccessInStaticScope;
|
||||
import source.syntax.Keywords;
|
||||
import source.syntax.Labels;
|
||||
import source.syntax.QualifiedNames;
|
||||
import source.syntax.References;
|
||||
import source.syntax.SpecialFunctions;
|
||||
import source.syntax.ValidIndexedAccesses;
|
||||
|
||||
public class SyntaxTests extends AbstractTest {
|
||||
|
||||
@Test
|
||||
|
||||
@ -16,13 +16,14 @@ package org.jsweet.test.transpiler;
|
||||
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import org.jsweet.test.transpiler.source.throwable.InvalidTryCatchTest;
|
||||
import org.jsweet.test.transpiler.source.throwable.TryCatchFinallyTest;
|
||||
import org.jsweet.transpiler.JSweetProblem;
|
||||
import org.jsweet.transpiler.util.EvaluationResult;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import source.throwable.InvalidTryCatchTest;
|
||||
import source.throwable.TryCatchFinallyTest;
|
||||
|
||||
public class ThrowableTests extends AbstractTest {
|
||||
|
||||
@Test
|
||||
|
||||
@ -23,8 +23,6 @@ import java.io.File;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import org.jsweet.JSweetCommandLineLauncher;
|
||||
import org.jsweet.test.transpiler.source.overload.Overload;
|
||||
import org.jsweet.test.transpiler.source.structural.AbstractClass;
|
||||
import org.jsweet.transpiler.JSweetTranspiler;
|
||||
import org.jsweet.transpiler.ModuleKind;
|
||||
import org.jsweet.transpiler.SourceFile;
|
||||
@ -33,6 +31,9 @@ import org.jsweet.transpiler.util.Util;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import source.overload.Overload;
|
||||
import source.structural.AbstractClass;
|
||||
|
||||
public class TranspilerTests extends AbstractTest {
|
||||
|
||||
@Ignore
|
||||
|
||||
@ -21,18 +21,19 @@ import static org.junit.Assert.fail;
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.jsweet.test.transpiler.source.tscomparison.AbstractClasses;
|
||||
import org.jsweet.test.transpiler.source.tscomparison.ActualScoping;
|
||||
import org.jsweet.test.transpiler.source.tscomparison.CompileTimeWarnings;
|
||||
import org.jsweet.test.transpiler.source.tscomparison.OtherThisExample;
|
||||
import org.jsweet.test.transpiler.source.tscomparison.SaferVarargs;
|
||||
import org.jsweet.test.transpiler.source.tscomparison.StrongerTyping;
|
||||
import org.jsweet.test.transpiler.source.tscomparison.ThisIsThis;
|
||||
import org.jsweet.transpiler.SourceFile;
|
||||
import org.jsweet.transpiler.util.EvaluationResult;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import source.tscomparison.AbstractClasses;
|
||||
import source.tscomparison.ActualScoping;
|
||||
import source.tscomparison.CompileTimeWarnings;
|
||||
import source.tscomparison.OtherThisExample;
|
||||
import source.tscomparison.SaferVarargs;
|
||||
import source.tscomparison.StrongerTyping;
|
||||
import source.tscomparison.ThisIsThis;
|
||||
|
||||
public class TsComparisonTest extends AbstractTest {
|
||||
|
||||
@Ignore
|
||||
|
||||
@ -16,22 +16,23 @@ package org.jsweet.test.transpiler;
|
||||
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import org.jsweet.test.transpiler.source.typing.ArraysOfLambdas;
|
||||
import org.jsweet.test.transpiler.source.typing.ClassTypeAsFunction;
|
||||
import org.jsweet.test.transpiler.source.typing.ClassTypeAsTypeOf;
|
||||
import org.jsweet.test.transpiler.source.typing.InvalidIndexedAccesses;
|
||||
import org.jsweet.test.transpiler.source.typing.Lambdas;
|
||||
import org.jsweet.test.transpiler.source.typing.Numbers;
|
||||
import org.jsweet.test.transpiler.source.typing.StringTypesUsage;
|
||||
import org.jsweet.test.transpiler.source.typing.Tuples;
|
||||
import org.jsweet.test.transpiler.source.typing.Unions;
|
||||
import org.jsweet.test.transpiler.source.typing.VoidType;
|
||||
import org.jsweet.test.transpiler.source.typing.WrongUnions;
|
||||
import org.jsweet.transpiler.JSweetProblem;
|
||||
import org.jsweet.transpiler.util.EvaluationResult;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import source.typing.ArraysOfLambdas;
|
||||
import source.typing.ClassTypeAsFunction;
|
||||
import source.typing.ClassTypeAsTypeOf;
|
||||
import source.typing.InvalidIndexedAccesses;
|
||||
import source.typing.Lambdas;
|
||||
import source.typing.Numbers;
|
||||
import source.typing.StringTypesUsage;
|
||||
import source.typing.Tuples;
|
||||
import source.typing.Unions;
|
||||
import source.typing.VoidType;
|
||||
import source.typing.WrongUnions;
|
||||
|
||||
public class TypingTests extends AbstractTest {
|
||||
|
||||
@Test
|
||||
|
||||
@ -16,18 +16,19 @@ package org.jsweet.test.transpiler;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.jsweet.test.transpiler.source.varargs.VarargsCalledWithArray;
|
||||
import org.jsweet.test.transpiler.source.varargs.VarargsOnAnonymous;
|
||||
import org.jsweet.test.transpiler.source.varargs.VarargsOnApi;
|
||||
import org.jsweet.test.transpiler.source.varargs.VarargsOnField;
|
||||
import org.jsweet.test.transpiler.source.varargs.VarargsOnGetter;
|
||||
import org.jsweet.test.transpiler.source.varargs.VarargsOnNew;
|
||||
import org.jsweet.test.transpiler.source.varargs.VarargsOnStaticMethod;
|
||||
import org.jsweet.test.transpiler.source.varargs.VarargsTransmission;
|
||||
import org.jsweet.transpiler.util.EvaluationResult;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import source.varargs.VarargsCalledWithArray;
|
||||
import source.varargs.VarargsOnAnonymous;
|
||||
import source.varargs.VarargsOnApi;
|
||||
import source.varargs.VarargsOnField;
|
||||
import source.varargs.VarargsOnGetter;
|
||||
import source.varargs.VarargsOnNew;
|
||||
import source.varargs.VarargsOnStaticMethod;
|
||||
import source.varargs.VarargsTransmission;
|
||||
|
||||
public class VarargsTests extends AbstractTest {
|
||||
@Test
|
||||
@Ignore
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
@jsweet.lang.Root
|
||||
package org.jsweet.test.transpiler.source.structural.globalclasses.root;
|
||||
@ -1,5 +0,0 @@
|
||||
package org.jsweet.test.transpiler.source.structural.rootparent1;
|
||||
|
||||
public class InvalidClassLocation {
|
||||
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
package org.jsweet.test.transpiler.source.structural.rootparent1.root;
|
||||
|
||||
public class NoClassesInRootParent {
|
||||
|
||||
}
|
||||
@ -1,2 +0,0 @@
|
||||
@jsweet.lang.Root
|
||||
package org.jsweet.test.transpiler.source.structural.rootparent1.root;
|
||||
@ -1,2 +0,0 @@
|
||||
@jsweet.lang.Root
|
||||
package org.jsweet.test.transpiler.source.structural.rootparent2;
|
||||
@ -1,5 +0,0 @@
|
||||
package org.jsweet.test.transpiler.source.structural.rootparent2.root;
|
||||
|
||||
public class NoRootInRoot {
|
||||
|
||||
}
|
||||
@ -1,2 +0,0 @@
|
||||
@jsweet.lang.Root
|
||||
package org.jsweet.test.transpiler.source.structural.rootparent2.root;
|
||||
@ -12,18 +12,18 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.ambient;
|
||||
package source.ambient;
|
||||
|
||||
import jsweet.lang.Ambient;
|
||||
|
||||
public class LibAccess {
|
||||
public static void main(String[] args) {
|
||||
Base m = new org.jsweet.test.transpiler.source.ambient.Base();
|
||||
Base m = new source.ambient.Base();
|
||||
m.m1();
|
||||
|
||||
//MixinInterface.class.cast(m).extension();
|
||||
|
||||
((org.jsweet.test.transpiler.source.ambient.Extension) m).m2();
|
||||
((source.ambient.Extension) m).m2();
|
||||
|
||||
//MixinInterface.class.cast(get()).extension();
|
||||
|
||||
@ -12,18 +12,18 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.ambient;
|
||||
package source.ambient;
|
||||
|
||||
import org.jsweet.test.transpiler.source.ambient.lib.Base;
|
||||
import org.jsweet.test.transpiler.source.ambient.lib.Extension;
|
||||
import org.jsweet.test.transpiler.source.ambient.lib.sub.C;
|
||||
import source.ambient.lib.Base;
|
||||
import source.ambient.lib.Extension;
|
||||
import source.ambient.lib.sub.C;
|
||||
|
||||
public class LibAccessSubModule {
|
||||
public static void main(String[] args) {
|
||||
Base m = new org.jsweet.test.transpiler.source.ambient.lib.Base();
|
||||
Base m = new source.ambient.lib.Base();
|
||||
m.m1();
|
||||
|
||||
((org.jsweet.test.transpiler.source.ambient.lib.Extension) m).m2();
|
||||
((source.ambient.lib.Extension) m).m2();
|
||||
|
||||
((Extension) get()).m2();
|
||||
}
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.ambient.lib;
|
||||
package source.ambient.lib;
|
||||
|
||||
import jsweet.lang.Ambient;
|
||||
|
||||
@ -12,12 +12,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.ambient.lib;
|
||||
package source.ambient.lib;
|
||||
|
||||
import jsweet.lang.Ambient;
|
||||
|
||||
@Ambient
|
||||
// @Interface
|
||||
public class Extension extends org.jsweet.test.transpiler.source.ambient.lib.Base {
|
||||
public class Extension extends source.ambient.lib.Base {
|
||||
native public void m2();
|
||||
}
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.ambient.lib.sub;
|
||||
package source.ambient.lib.sub;
|
||||
|
||||
import jsweet.lang.Ambient;
|
||||
|
||||
@ -12,5 +12,5 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
@jsweet.lang.Root
|
||||
package org.jsweet.test.transpiler.source.require;
|
||||
@jsweet.lang.Root
|
||||
package source.ambient;
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.api;
|
||||
package source.api;
|
||||
|
||||
import jsweet.lang.Boolean;
|
||||
import jsweet.lang.Number;
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.api;
|
||||
package source.api;
|
||||
|
||||
import jsweet.lang.Array;
|
||||
import jsweet.lang.IArguments;
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.api;
|
||||
package source.api;
|
||||
|
||||
import static jsweet.util.Globals.$export;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.api;
|
||||
package source.api;
|
||||
|
||||
import jsweet.lang.Function;
|
||||
import jsweet.lang.String;
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.api;
|
||||
package source.api;
|
||||
|
||||
public class QualifiedInstantiation {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.api;
|
||||
package source.api;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.util.Iterator;
|
||||
@ -12,14 +12,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.blocksgame;
|
||||
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.MobileElement;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Point;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Vector;
|
||||
package source.blocksgame;
|
||||
|
||||
import jsweet.dom.CanvasRenderingContext2D;
|
||||
import jsweet.lang.Math;
|
||||
import source.blocksgame.util.MobileElement;
|
||||
import source.blocksgame.util.Point;
|
||||
import source.blocksgame.util.Vector;
|
||||
|
||||
public class Ball extends MobileElement {
|
||||
|
||||
@ -12,18 +12,17 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.blocksgame;
|
||||
package source.blocksgame;
|
||||
|
||||
import static jsweet.dom.Globals.document;
|
||||
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.AnimatedElement;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Collisions;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.MobileElement;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Point;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Vector;
|
||||
|
||||
import jsweet.dom.CanvasRenderingContext2D;
|
||||
import jsweet.dom.HTMLImageElement;
|
||||
import source.blocksgame.util.AnimatedElement;
|
||||
import source.blocksgame.util.Collisions;
|
||||
import source.blocksgame.util.MobileElement;
|
||||
import source.blocksgame.util.Point;
|
||||
import source.blocksgame.util.Vector;
|
||||
|
||||
public class BlockElement extends AnimatedElement {
|
||||
|
||||
@ -12,10 +12,10 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.blocksgame;
|
||||
package source.blocksgame;
|
||||
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Direction;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Point;
|
||||
import source.blocksgame.util.Direction;
|
||||
import source.blocksgame.util.Point;
|
||||
|
||||
public class Factory {
|
||||
|
||||
@ -12,17 +12,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.blocksgame;
|
||||
package source.blocksgame;
|
||||
|
||||
import static jsweet.dom.Globals.console;
|
||||
import static jsweet.dom.Globals.document;
|
||||
import static jsweet.util.Globals.array;
|
||||
import static jsweet.util.StringTypes._2d;
|
||||
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Direction;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Point;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Rectangle;
|
||||
|
||||
import jsweet.dom.CanvasRenderingContext2D;
|
||||
import jsweet.dom.Event;
|
||||
import jsweet.dom.HTMLElement;
|
||||
@ -31,6 +27,9 @@ import jsweet.dom.Touch;
|
||||
import jsweet.dom.TouchEvent;
|
||||
import jsweet.lang.Date;
|
||||
import jsweet.lang.Math;
|
||||
import source.blocksgame.util.Direction;
|
||||
import source.blocksgame.util.Point;
|
||||
import source.blocksgame.util.Rectangle;
|
||||
|
||||
public class GameArea {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.blocksgame;
|
||||
package source.blocksgame;
|
||||
|
||||
import static jsweet.dom.Globals.console;
|
||||
import static jsweet.dom.Globals.document;
|
||||
@ -22,9 +22,7 @@ import static jsweet.util.StringTypes.mouseup;
|
||||
import static jsweet.util.StringTypes.touchend;
|
||||
import static jsweet.util.StringTypes.touchmove;
|
||||
import static jsweet.util.StringTypes.touchstart;
|
||||
import static org.jsweet.test.transpiler.source.blocksgame.Globals.animate;
|
||||
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Point;
|
||||
import static source.blocksgame.Globals.animate;
|
||||
|
||||
import jsweet.dom.Event;
|
||||
import jsweet.dom.HTMLCanvasElement;
|
||||
@ -33,6 +31,7 @@ import jsweet.dom.MouseEvent;
|
||||
import jsweet.dom.NodeList;
|
||||
import jsweet.dom.TouchEvent;
|
||||
import jsweet.lang.Math;
|
||||
import source.blocksgame.util.Point;
|
||||
|
||||
public class GameManager {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.blocksgame;
|
||||
package source.blocksgame;
|
||||
|
||||
import static jsweet.dom.Globals.console;
|
||||
import static jsweet.dom.Globals.window;
|
||||
@ -12,18 +12,17 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.blocksgame;
|
||||
package source.blocksgame;
|
||||
|
||||
import static jsweet.dom.Globals.console;
|
||||
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Collisions;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Direction;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.MobileElement;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Point;
|
||||
import org.jsweet.test.transpiler.source.blocksgame.util.Vector;
|
||||
|
||||
import jsweet.dom.CanvasRenderingContext2D;
|
||||
import jsweet.lang.Math;
|
||||
import source.blocksgame.util.Collisions;
|
||||
import source.blocksgame.util.Direction;
|
||||
import source.blocksgame.util.MobileElement;
|
||||
import source.blocksgame.util.Point;
|
||||
import source.blocksgame.util.Vector;
|
||||
|
||||
public class Player extends MobileElement {
|
||||
|
||||
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@ -12,5 +12,5 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
@jsweet.lang.Root
|
||||
package org.jsweet.test.transpiler.source.ambient;
|
||||
@jsweet.lang.Root
|
||||
package source.blocksgame;
|
||||
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.blocksgame.util;
|
||||
package source.blocksgame.util;
|
||||
|
||||
import jsweet.dom.CanvasRenderingContext2D;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.blocksgame.util;
|
||||
package source.blocksgame.util;
|
||||
|
||||
import jsweet.lang.Math;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.blocksgame.util;
|
||||
package source.blocksgame.util;
|
||||
|
||||
import jsweet.lang.Math;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.blocksgame.util;
|
||||
package source.blocksgame.util;
|
||||
|
||||
import jsweet.lang.Error;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.blocksgame.util;
|
||||
package source.blocksgame.util;
|
||||
|
||||
|
||||
public class MobileElement extends AnimatedElement {
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.blocksgame.util;
|
||||
package source.blocksgame.util;
|
||||
|
||||
import jsweet.lang.Math;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.blocksgame.util;
|
||||
package source.blocksgame.util;
|
||||
|
||||
import jsweet.lang.Math;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.blocksgame.util;
|
||||
package source.blocksgame.util;
|
||||
|
||||
import jsweet.lang.Math;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.candies;
|
||||
package source.candies;
|
||||
|
||||
import static def.angularjs.Globals.angular;
|
||||
import static jsweet.util.Globals.array;
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.candies;
|
||||
package source.candies;
|
||||
|
||||
import static def.body_parser.body_parser.Globals.json;
|
||||
import static def.body_parser.body_parser.Globals.urlencoded;
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.candies;
|
||||
package source.candies;
|
||||
|
||||
import static def.body_parser.body_parser.Globals.json;
|
||||
import static def.body_parser.body_parser.Globals.urlencoded;
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.candies;
|
||||
package source.candies;
|
||||
|
||||
import static def.jquery.Globals.$;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.candies;
|
||||
package source.candies;
|
||||
|
||||
import static def.socket_io.Globals.socket_io;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.generics;
|
||||
package source.generics;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class InstantiationWithGenerics<T, V> {
|
||||
@ -27,8 +27,8 @@ public class InstantiationWithGenerics<T, V> {
|
||||
|
||||
public static void main(String[] args) {
|
||||
InstantiationWithGenerics<String, Integer> foo = new InstantiationWithGenerics<String, Integer>("lolo", 4);
|
||||
org.jsweet.test.transpiler.source.generics.InstantiationWithGenerics<String, Integer> bar
|
||||
= new org.jsweet.test.transpiler.source.generics.InstantiationWithGenerics<String, Integer>("lolo", 4);
|
||||
source.generics.InstantiationWithGenerics<String, Integer> bar
|
||||
= new source.generics.InstantiationWithGenerics<String, Integer>("lolo", 4);
|
||||
C<String> c = new C<String>();
|
||||
}
|
||||
}
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.init;
|
||||
package source.init;
|
||||
|
||||
public class Constructor {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.init;
|
||||
package source.init;
|
||||
|
||||
public class ConstructorField {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.init;
|
||||
package source.init;
|
||||
|
||||
import jsweet.lang.Interface;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.init;
|
||||
package source.init;
|
||||
|
||||
public class ConstructorMethod {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.init;
|
||||
package source.init;
|
||||
|
||||
import jsweet.lang.Interface;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.init;
|
||||
package source.init;
|
||||
|
||||
import static jsweet.util.Globals.$export;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.init;
|
||||
package source.init;
|
||||
|
||||
import jsweet.lang.Interface;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.init;
|
||||
package source.init;
|
||||
|
||||
import jsweet.lang.Interface;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.init;
|
||||
package source.init;
|
||||
|
||||
import jsweet.lang.Interface;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.init;
|
||||
package source.init;
|
||||
|
||||
import jsweet.lang.Disabled;
|
||||
import static jsweet.util.Globals.$export;
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.init;
|
||||
package source.init;
|
||||
|
||||
import jsweet.lang.Optional;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.init;
|
||||
package source.init;
|
||||
|
||||
import static jsweet.util.Globals.$export;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.overload;
|
||||
package source.overload;
|
||||
|
||||
import static jsweet.util.Globals.$export;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.overload;
|
||||
package source.overload;
|
||||
|
||||
public class WrongOverload {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.overload;
|
||||
package source.overload;
|
||||
|
||||
public class WrongOverloads {
|
||||
|
||||
@ -12,9 +12,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.require;
|
||||
package source.require;
|
||||
|
||||
import org.jsweet.test.transpiler.source.require.a.A;
|
||||
import source.require.a.A;
|
||||
|
||||
public class TopLevel1 {
|
||||
|
||||
@ -12,9 +12,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.require;
|
||||
package source.require;
|
||||
|
||||
import org.jsweet.test.transpiler.source.require.a.A;
|
||||
import source.require.a.A;
|
||||
|
||||
public class TopLevel2 {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.require.a;
|
||||
package source.require.a;
|
||||
|
||||
import static jsweet.util.Globals.$export;
|
||||
|
||||
@ -12,9 +12,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.require.a;
|
||||
package source.require.a;
|
||||
|
||||
import org.jsweet.test.transpiler.source.require.a.b.B1;
|
||||
import source.require.a.b.B1;
|
||||
|
||||
public class Use1 {
|
||||
|
||||
@ -12,9 +12,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.require.a;
|
||||
package source.require.a;
|
||||
|
||||
import org.jsweet.test.transpiler.source.require.a.b.B1;
|
||||
import source.require.a.b.B1;
|
||||
|
||||
public class Use2 {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.require.a.b;
|
||||
package source.require.a.b;
|
||||
|
||||
import static jsweet.util.Globals.$export;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.require.a.b;
|
||||
package source.require.a.b;
|
||||
|
||||
import static jsweet.util.Globals.$export;
|
||||
|
||||
@ -12,11 +12,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.require.b;
|
||||
package source.require.b;
|
||||
|
||||
import static jsweet.util.Globals.$export;
|
||||
|
||||
import org.jsweet.test.transpiler.source.require.a.A;
|
||||
import source.require.a.A;
|
||||
|
||||
public class ClassImport {
|
||||
|
||||
@ -12,16 +12,15 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.require.b;
|
||||
package source.require.b;
|
||||
|
||||
import static def.express.Globals.express;
|
||||
import static jsweet.util.Globals.$export;
|
||||
|
||||
import org.jsweet.test.transpiler.source.require.a.A;
|
||||
import org.jsweet.test.transpiler.source.require.a.b.B1;
|
||||
import org.jsweet.test.transpiler.source.require.a.b.B2;
|
||||
|
||||
import def.express.express.Express;
|
||||
import source.require.a.A;
|
||||
import source.require.a.b.B1;
|
||||
import source.require.a.b.B2;
|
||||
|
||||
public class ClassImportImplicitRequire {
|
||||
|
||||
@ -12,12 +12,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.require.b;
|
||||
package source.require.b;
|
||||
|
||||
import static jsweet.dom.Globals.console;
|
||||
import static org.jsweet.test.transpiler.source.require.globals.Globals.animate;
|
||||
import static source.require.globals.Globals.animate;
|
||||
|
||||
import org.jsweet.test.transpiler.source.require.globals.Globals;
|
||||
import source.require.globals.Globals;
|
||||
|
||||
public class GlobalsImport {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jsweet.test.transpiler.source.require.globals;
|
||||
package source.require.globals;
|
||||
|
||||
import static jsweet.dom.Globals.window;
|
||||
|
||||
@ -13,4 +13,4 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
@jsweet.lang.Root
|
||||
package org.jsweet.test.transpiler.source.blocksgame;
|
||||
package source.require;
|
||||
@ -1,7 +1,7 @@
|
||||
package org.jsweet.test.transpiler.source.structural.globalclasses.noroot.a;
|
||||
package source.root.noroot.a;
|
||||
|
||||
import static jsweet.util.Globals.$export;
|
||||
import static org.jsweet.test.transpiler.source.structural.globalclasses.noroot.a.Globals.m2;
|
||||
import static source.root.noroot.a.Globals.m2;
|
||||
|
||||
public class GlobalsInNoRoot {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package org.jsweet.test.transpiler.source.structural.globalclasses.root.a;
|
||||
package source.root.root.a;
|
||||
|
||||
import static jsweet.util.Globals.$export;
|
||||
import static org.jsweet.test.transpiler.source.structural.globalclasses.root.a.Globals.m2;
|
||||
import static source.root.root.a.Globals.m2;
|
||||
|
||||
public class GlobalsInRoot {
|
||||
|
||||
2
src/test/java/source/root/root/package-info.java
Normal file
@ -0,0 +1,2 @@
|
||||
@jsweet.lang.Root
|
||||
package source.root.root;
|
||||
@ -0,0 +1,5 @@
|
||||
package source.root.rootparent1;
|
||||
|
||||
public class InvalidClassLocation {
|
||||
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
package source.root.rootparent1.root;
|
||||
|
||||
public class NoClassesInRootParent {
|
||||
|
||||
}
|
||||