Commit Graph

55 Commits

Author SHA1 Message Date
Vyacheslav Gerasimov 8737168d41 Build: Use maven-publish in configurePublishing helper 2020-06-14 20:31:26 +03:00
Vyacheslav Gerasimov c2589c7d6d Build: Rename javadocJar for groovy to configureJavadocJar
So it doesn't interfere with javadocJar task accessor
2020-06-14 20:31:25 +03:00
Ilya Gorbunov 96ed87d81b assertFailsWith: set unexpected exception as a cause of assertion error
#KT-23514
2020-03-31 13:37:03 +03:00
Ilya Gorbunov 2bb36899da Introduce 'fail' method to throw AssertionError with cause
#KT-37804
2020-03-31 13:37:03 +03:00
Alexander Udalov 787e4503e5 Migrate -Xuse-experimental -> -Xopt-in in project sources 2020-03-10 12:07:15 +01:00
Yan Zhulanow 73813aef23 Pill: Support all Gradle source sets, not just main/test 2020-02-14 17:35:15 +09:00
Vyacheslav Gerasimov 7de023135e Build: Remove outdated fix broken in gradle 6.0
Can't remove from dependsOn anymore
2019-11-27 21:26:33 +03:00
Ilya Gorbunov 59482f6827 Do not blank opt in for allowing kotlin package in all subprojects
-Xallow-kotlin-package must be specified explicitly to prevent
unintended declarations in kotlin package.
2019-10-24 16:05:48 +03:00
Vyacheslav Gerasimov db3b01d2d4 Build: Centralize compiler dist build logic in :kotlin-compiler project 2019-06-27 17:56:48 +03:00
Ilya Gorbunov 6632cf5b1d Add hidden methods to keep binary compatibility in kotlin-test for JVM 2019-05-21 18:53:52 +03:00
Ilya Gorbunov 22694fa6b0 Make assertFails(With) inline-only functions
So that the lambda passed to these functions can capture suspend
function calls.

#KT-31194 Fixed
2019-05-21 18:53:52 +03:00
Ilya Gorbunov 18f9b20610 Remove internal visibility suppressions in kotlin.test
Internal visibility works fine in MPP, so they are no longer required.
2019-05-15 06:18:27 +03:00
nikita.movshin 65244b4bea Update copyright.
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00
Vyacheslav Gerasimov 14d9ec9fb2 Build: Use javadocJar helper to specify artifact explicitly
Creating javadocJar task for every project produces lots of unnecessary
tasks, some project don't even have code. Jar task without outDir
property set fails idea import with gradle 5.0+
2019-02-18 19:59:36 +03:00
Vyacheslav Gerasimov f58acbeef5 Build: implement useBootstrapStdlib flag
Excludes stdlib projects from build and uses bootstrap stdlib artifacts

 #KT-29205
2019-01-21 21:09:40 +03:00
Pavel Punegov 1c4ecd287d DefaultAsserter object. Add function to replace constructor invoke. 2019-01-11 17:38:58 +03:00
Pavel Punegov ac0f612781 Make kotlin.test asserter be ThreadLocal 2019-01-11 17:38:58 +03:00
Ilya Gorbunov 48c80e247e Move kotlin.test common annotations tests
Place them in tests of kotlin-test-annotations-common, so that every
platform module that implements that common module (e.g. kotlin-test-junit,
kotlin-test-junit5, kotlin-test-testng) gets these tests run.

Improve test for BeforeTest/AfterTest annotations to check that they are
invoked before/after _each_ test method.

#KT-27629
2018-12-03 21:46:26 +03:00
Ilya Gorbunov efa7bf0c37 Unify kotlin.test docs 2018-10-23 22:21:25 +03:00
Piotr Krzeminski 3c46bb9d03 kotlin-test: Add documentation for value returned by assertFailsWith
A follow-up after https://youtrack.jetbrains.com/issue/KT-27418

Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com>
2018-10-23 22:21:25 +03:00
Ilya Gorbunov 21b71f3bb1 Clarify the purpose of the message parameter of assertFailsWith
#KT-22869 Fixed
2018-10-01 18:03:23 +03:00
Ilya Gorbunov ad76edd7b7 Raise deprecation level for org.junit.Test in stdlib for common and JS
#KT-21703
2018-09-11 18:15:03 +03:00
Dmitry Savvinov accbd07b2e Publish ContractsDsl
- Mark @ContractsDsl as @Experimental
- Move Contracts DSL out from 'internal' package
- Change visibility of ContractsDsl from 'internal' to 'public'

^KT-25274 Fixed
^KT-25495 Fixed
2018-08-30 16:19:51 +03:00
Dmitry Savvinov 668bd209f2 Use -Xallow-kotlin-package while compiling common sources
K2MetadataCompiler doesn't perform explicit check of compilation of
'kotlin' package, thus stdlib build wasn't passing '-Xallow-kotlin-package'.

However, we have special hack for compiling stdlib with contracts: if
'-Xallow-kotlin-package' is passed, then allow compiling contracts for
custom functions. We have to do it this way, because we don't want
stdlib artifacts to be marked with pre-release flag, even though
contracts for custom functions are not enabled yet
(see eae9923dbe).

Therefore, it's crucial to pass -Xallow-kotlin-package properly for that
side-effect.
2018-07-09 18:57:58 +03:00
Yan Zhulanow c439b6d38b Pill: Import common modules as libraries 2018-05-15 16:29:47 +03:00
Ilya Gorbunov d9d7b87fd9 Reformat kotlin.test library 2018-05-10 16:27:15 +03:00
Ilya Gorbunov 2e12834b6a Update copyrights in kotlin.test library
Change line number in StackTraceJVMTest due to the added copyright
2018-04-26 21:57:50 +03:00
Ilya Gorbunov 7ccbd36304 Set module name for common projects, this isn't done automatically yet 2018-04-12 17:53:00 +03:00
Ilya Chernikov 6838873a93 Fix local build problem - task compileJava not found
The problem is happening because our plugin deletes the task from
common projects, which may lead to such errors. The proper fix is
planned in our gradle plugin.
2018-03-14 15:39:30 +01:00
Alexey Tsvetkov 29d2679e8d Do not configure dist task for every published module
This change avoids compiling kotlin-compiler-embeddable,
kotlin-gradle-plugin, and other gradle plugins,
when running `./gradlew dist`
2018-02-01 17:39:55 +03:00
Simon Ogorodnik fb3cf212ce Suppress docs for org.junit.Test header in kotlin.test 2017-12-15 20:09:45 +03:00
Ilya Gorbunov f002493218 Multiplatform test annotations
Actual annotations are provided in kotlin-test-junit on JVM side
and in kotlin-test-js on JS side.

#KT-19696
2017-10-15 17:40:53 +03:00
Ilya Gorbunov 485ca10b84 Improve failed assertSame/NotSame messages, correct tests 2017-10-13 18:53:52 +03:00
Jake Wharton e611b9a9ba Add assertSame and assertNotSame methods. 2017-10-13 18:53:52 +03:00
Dmitry Savvinov fb03656e99 Effects: annotate functions in stdlib with contracts
build.xml was also changed to incorporate contracts in
mock-runtime-for-tests.jar, because it is using Standard.kt, which, in
turn, has contract-annotated functions.

==========
Introduction of EffectSystem: 17/18
2017-10-12 11:55:26 +03:00
Ilya Gorbunov 2d9c4246bd Add explicit constructor to expect annotation 2017-10-11 19:18:30 +03:00
Stanislav Erokhin 481cbd0850 Migrate header to expect in libraries projects 2017-09-16 19:47:45 +03:00
Stanislav Erokhin 2b186909d4 Migrate diagnostic names for header/impl 2017-09-15 18:29:29 +03:00
Anton Bannykh 6ed7eaf546 JS tests: changes to kotlin.test + the way compiler tests are generated. 2017-07-19 12:24:09 +03:00
Ilya Gorbunov 2c32bae5ca kotlin-test: Make assertFailsWith<reified T: Throwable>() common 2017-04-21 20:52:14 +03:00
Ilya Gorbunov 307b132015 kotlin-test: Make assertFailsWith(KClass<T: Throwable>) common 2017-04-21 20:52:12 +03:00
Ilya Gorbunov ec8ead754f Run kotlin-test-js tests with kotlin-stdlib-js
Rework kotlin-test common tests to make them runnable with qunit.
Change the way how asserter is overridden in js box tests.
Minor: remove unneeded test configs
2017-04-21 20:51:07 +03:00
Ilya Gorbunov f009e0c665 kotlin-test: Make 'todo { }' function common 2017-04-21 20:50:59 +03:00
Ilya Gorbunov 337fd4e180 Drop poms that are no longer required. Drop separate unit test modules for stdlib js. 2017-04-08 08:28:50 +03:00
Ilya Gorbunov 0b2cadc638 Provide a method for common publishing configuration. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 92ef26606b Refactor build to make manifest specification less error-prone.
Use legacy implementation title in manifest of JS stdlib for now.

Change the way common jvm project configurations is applied.
Add missing artifacts to common libraries.
2017-04-06 20:32:37 +03:00
Ilya Gorbunov 65a800840c Use single task for empty javadocs. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov e119f3a042 Make kotlin-test tests compile as tests for multiplatform project
Also remove utils not needed anymore.
2017-04-06 20:32:37 +03:00
Ilya Gorbunov f8ebe5593f Make assertFailsWith common
Because headers cannot have default parameters.
This leads to less effective implementation in JVM.
2017-04-06 20:32:37 +03:00
Ilya Gorbunov 609355a311 Provide kotlin.AssertionError in kotlin-stdlib-common
Remove related workarounds from kotlin-test-common
2017-04-06 20:32:37 +03:00