JS: do not use "-no-stdlib" in non-relevant tests
Rename some Ant tests: "simple[...]" -> "simpleWithoutStdlib[...]" and "simpleWithStdlib[...]" -> "simple[...]"
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
compiler/testData/integration/ant/js/simpleWithoutStdlibAndFolderAsAnotherLib/jslib-example/LibraryExample.kt
|
||||
-no-stdlib
|
||||
-meta-info
|
||||
-output
|
||||
$TEMP_DIR$/jslib-example.js
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
$TESTDATA_DIR$/withLib.kt
|
||||
-libraries
|
||||
compiler/testData/integration/ant/js/simpleWithStdlibAndJsFileAsAnotherLib
|
||||
compiler/testData/integration/ant/js/simpleWithJsFileAsAnotherLib
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
warning: 'compiler/testData/integration/ant/js/simpleWithStdlibAndJsFileAsAnotherLib' is not a valid Kotlin Javascript library
|
||||
warning: 'compiler/testData/integration/ant/js/simpleWithJsFileAsAnotherLib' is not a valid Kotlin Javascript library
|
||||
compiler/testData/cli/js/withLib.kt:2:8: error: unresolved reference: library
|
||||
import library.sample.*
|
||||
^
|
||||
compiler/testData/cli/js/withLib.kt:6:13: error: unresolved reference: pairAdd
|
||||
val x = pairAdd(p)
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
COMPILATION_ERROR
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
$TESTDATA_DIR$/simple2js.kt
|
||||
-no-stdlib
|
||||
-output
|
||||
$TESTDATA_DIR$
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
$TESTDATA_DIR$/simple2js.kt
|
||||
-no-stdlib
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
-output-postfix
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
$TESTDATA_DIR$/simple2js.kt
|
||||
-no-stdlib
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
-output-prefix
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
$TESTDATA_DIR$/simple2js.kt
|
||||
-no-stdlib
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
$TESTDATA_DIR$/sourceMap.kt
|
||||
-no-stdlib
|
||||
-source-map
|
||||
-source-map-prefix
|
||||
./
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
$TESTDATA_DIR$/sourceMapCharEscape.kt
|
||||
-no-stdlib
|
||||
-source-map
|
||||
-source-map-embed-sources
|
||||
always
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
$TESTDATA_DIR$/sourceMapDuplicatePath/
|
||||
-no-stdlib
|
||||
-source-map
|
||||
-source-map-base-dirs
|
||||
$TESTDATA_DIR$/sourceMapDuplicatePath/foo:$TESTDATA_DIR$/sourceMapDuplicatePath/bar
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
$TESTDATA_DIR$/sourceMap.kt
|
||||
-no-stdlib
|
||||
-source-map
|
||||
-source-map-prefix
|
||||
./
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
$TESTDATA_DIR$/sourceMap.kt
|
||||
-no-stdlib
|
||||
-source-map
|
||||
-source-map-prefix
|
||||
/localhost/src/
|
||||
|
||||
+1
-3
@@ -1,14 +1,12 @@
|
||||
$TESTDATA_DIR$/sourceMapRelativeRoot/lib/src/lib.kt
|
||||
-no-stdlib
|
||||
-source-map
|
||||
-meta-info
|
||||
-output
|
||||
$TESTDATA_DIR$/sourceMapRelativeRoot/lib/out/lib.js
|
||||
---
|
||||
$TESTDATA_DIR$/sourceMapRelativeRoot/main/src/main.kt
|
||||
-no-stdlib
|
||||
-libraries
|
||||
$TESTDATA_DIR$/sourceMapRelativeRoot/lib/out/
|
||||
-source-map
|
||||
-output
|
||||
$TESTDATA_DIR$/sourceMapRelativeRoot/main/out/main.js
|
||||
$TESTDATA_DIR$/sourceMapRelativeRoot/main/out/main.js
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
$TESTDATA_DIR$/sourceMapRoot/foo/file1.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/bar/file2.kt
|
||||
-no-stdlib
|
||||
-source-map
|
||||
-source-map-prefix
|
||||
./
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
$TESTDATA_DIR$/sourceMapRoot/foo/file1.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/bar/file2.kt
|
||||
-no-stdlib
|
||||
-source-map
|
||||
-source-map-base-dirs
|
||||
$TESTDATA_DIR$/
|
||||
|
||||
@@ -2,7 +2,6 @@ $TESTDATA_DIR$/sourceMapRoot/foo/file1.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/bar/file2.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/bar/baz/file3.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/foo/baz/file4.kt
|
||||
-no-stdlib
|
||||
-source-map
|
||||
-source-map-base-dirs
|
||||
$TESTDATA_DIR$/sourceMapRoot/foo
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
$TESTDATA_DIR$/sourceMapRoot/foo/file1.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/bar/file2.kt
|
||||
-no-stdlib
|
||||
-source-map
|
||||
-source-map-base-dirs
|
||||
$TESTDATA_DIR$/foo:$TESTDATA_DIR$/bar
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
$TESTDATA_DIR$/../warnings.kt
|
||||
-no-stdlib
|
||||
-nowarn
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/hello.kt" noStdlib="true" output="${temp}/out.js">
|
||||
<kotlin2js src="${test.data}/hello.kt" output="${temp}/out.js">
|
||||
<compilerarg value="-Xno-inline"/>
|
||||
</kotlin2js>
|
||||
</target>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1"
|
||||
noStdlib="true"
|
||||
output="${temp}/out.js"
|
||||
outputPrefix="${test.data}/prefix"
|
||||
outputPostfix="${test.data}/postfix" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" noStdlib="true" output="${temp}/out.js" >
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" >
|
||||
<src>
|
||||
<pathelement path="${test.data}/bar.kt"/>
|
||||
<fileset dir="${test.data}/root2">
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" noStdlib="true" output="${temp}/out.js" outputPostfix="${test.data}/postfix" />
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" outputPostfix="${test.data}/postfix" />
|
||||
</target>
|
||||
</project>
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" noStdlib="true" output="${temp}/out.js" outputPrefix="${test.data}/prefix" />
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" outputPrefix="${test.data}/prefix" />
|
||||
</target>
|
||||
</project>
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" noStdlib="true" output="${temp}/out.js"/>
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call"/>
|
||||
</target>
|
||||
</project>
|
||||
|
||||
+10
-1
@@ -1,3 +1,12 @@
|
||||
package foo
|
||||
|
||||
fun box(): String = "OK"
|
||||
var ok = "FAIL"
|
||||
|
||||
val hello = Pair("Hello", "World")
|
||||
|
||||
fun main() {
|
||||
ok = "OK"
|
||||
println(hello.first + " " + hello.second)
|
||||
}
|
||||
|
||||
fun box(): String = ok
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" noStdlib="true" main="call"/>
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call"/>
|
||||
</target>
|
||||
</project>
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" noStdlib="true" output="${temp}/out.js" main="call"/>
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call"/>
|
||||
</target>
|
||||
</project>
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
package foo
|
||||
|
||||
var ok = "FAIL"
|
||||
|
||||
val hello = Pair("Hello", "World")
|
||||
|
||||
fun main() {
|
||||
ok = "OK"
|
||||
println(hello.first + " " + hello.second)
|
||||
}
|
||||
|
||||
fun box(): String = ok
|
||||
@@ -2,6 +2,6 @@
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" noStdlib="true" output="${temp}/out.js" main="call"/>
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call"/>
|
||||
</target>
|
||||
</project>
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call"/>
|
||||
<kotlin2js src="${test.data}/root1" noStdlib="true" output="${temp}/out.js"/>
|
||||
</target>
|
||||
</project>
|
||||
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
fun box(): String = "OK"
|
||||
@@ -2,6 +2,6 @@
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" noStdlib="true" output="${temp}/out.js" sourcemap="true"/>
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" sourcemap="true"/>
|
||||
</target>
|
||||
</project>
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" noStdlib="true" verbose="true"/>
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" verbose="true"/>
|
||||
</target>
|
||||
</project>
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" noStdlib="true" printVersion="true"/>
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" printVersion="true"/>
|
||||
</target>
|
||||
</project>
|
||||
|
||||
@@ -83,7 +83,6 @@ class LauncherScriptTest : TestCaseWithTmpdir() {
|
||||
runProcess(
|
||||
"kotlinc-js",
|
||||
"$testDataDirectory/emptyMain.kt",
|
||||
"-no-stdlib",
|
||||
"-output", File(tmpdir, "out.js").path
|
||||
)
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public class AntTaskJsTest extends AbstractAntTaskTest {
|
||||
doJsAntTest();
|
||||
}
|
||||
|
||||
public void testSimpleWithStdlib() throws Exception {
|
||||
public void testSimpleWithoutStdlib() throws Exception {
|
||||
doJsAntTest();
|
||||
}
|
||||
|
||||
@@ -107,19 +107,19 @@ public class AntTaskJsTest extends AbstractAntTaskTest {
|
||||
doJsAntTest("jslib-example.js");
|
||||
}
|
||||
|
||||
public void testSimpleWithStdlibAndJsFileAsAnotherLib() throws Exception {
|
||||
public void testSimpleWithJsFileAsAnotherLib() throws Exception {
|
||||
doJsAntTest("jslib-example.js");
|
||||
}
|
||||
|
||||
public void testSimpleWithStdlibAndJsFileAsAnotherLibModuleKind() throws Exception {
|
||||
public void testSimpleWithJsFileAsAnotherLibModuleKind() throws Exception {
|
||||
doJsAntTest(true, "amd.js", "jslib-example.js");
|
||||
}
|
||||
|
||||
public void testSimpleWithStdlibAndTwoJsFilesAsLibraries() throws Exception {
|
||||
public void testSimpleWithTwoJsFilesAsLibraries() throws Exception {
|
||||
doJsAntTest("jslib-example1.js", "jslib-example2.js");
|
||||
}
|
||||
|
||||
public void testSimpleWithStdlibAndJsFilesWithTwoModulesAsLibrary() throws Exception {
|
||||
public void testSimpleWithJsFilesWithTwoModulesAsLibrary() throws Exception {
|
||||
doJsAntTest("jslib-example.js");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user