diff --git a/libraries/build-docs.xml b/libraries/build-docs.xml index 1c3fb0016b2..31f6d09ce21 100644 --- a/libraries/build-docs.xml +++ b/libraries/build-docs.xml @@ -27,7 +27,7 @@ diff --git a/libraries/pom.xml b/libraries/pom.xml index 178799e1bb1..3792683a493 100644 --- a/libraries/pom.xml +++ b/libraries/pom.xml @@ -84,6 +84,7 @@ stdlib stdlib/jre7 stdlib/jre8 + stdlib/samples tools/kotlin-reflect tools/kotlin-osgi-bundle diff --git a/libraries/stdlib/samples/pom.xml b/libraries/stdlib/samples/pom.xml new file mode 100644 index 00000000000..980c8666981 --- /dev/null +++ b/libraries/stdlib/samples/pom.xml @@ -0,0 +1,85 @@ + + + + 4.0.0 + + + org.jetbrains.kotlin + kotlin-project + 1.1-SNAPSHOT + + + kotlin-stdlib-samples + + + + org.jetbrains.kotlin + kotlin-stdlib-jre8 + ${project.version} + + + junit + junit + 4.12 + + + org.jetbrains.kotlin + kotlin-test-junit + ${project.version} + + + + + src + test + + + + org.jetbrains.kotlin + kotlin-maven-plugin + ${project.version} + + + ${env.JDK_18} + + + + + + compile + process-sources + + compile + + + + + test-compile + test-compile + + test-compile + + + + + + maven-surefire-plugin + + + **/*.class + + once + ${env.JDK_18}/bin/java + + + + maven-deploy-plugin + + true + + + + + diff --git a/libraries/stdlib/samples/test/samples/_sampleUtils.kt b/libraries/stdlib/samples/test/samples/_sampleUtils.kt new file mode 100644 index 00000000000..040cc9d8b6c --- /dev/null +++ b/libraries/stdlib/samples/test/samples/_sampleUtils.kt @@ -0,0 +1,25 @@ +/* + * Copyright 2010-2016 JetBrains s.r.o. + * + * 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 samples + +import kotlin.test.assertEquals + +typealias Sample = org.junit.Test +typealias RunWith = org.junit.runner.RunWith +typealias Enclosed = org.junit.experimental.runners.Enclosed + +fun assertPrints(expression: Any?, expectedOutput: String) = assertEquals(expectedOutput, expression.toString())