Ilya Gorbunov
4ae5efd6da
Prevent calling AssertContentEquals with two Set arguments
...
It's unclear whether these sets are intended to be compared with
the unordered Set equality, or with the ordered Iterable equality.
KT-32996
2021-04-21 03:08:35 +03:00
Abduqodiri Qurbonzoda
c46d71d4ac
Remove DefaultAsserter() constructor-like function in kotlin-test
2021-04-07 00:23:22 +03:00
Renee Vandervelde
d520c37454
Add assertEquals and assertNotEquals for floating point numbers to kotlin-test #KT-8364
2021-04-06 18:37:09 +03:00
Abduqodiri Qurbonzoda
ff59b1c2ef
Introduce assertContains in kotlin-test #KT-45582
2021-04-06 18:36:56 +03:00
Ilya Gorbunov
42648d55a0
kotlin-test: make assertIs<T> returning value cast to T KT-45296
2021-03-18 21:57:16 +03:00
Ilya Gorbunov
e66eeefe2a
kotlin-test: assertIs and assertIsNot KT-45296
...
- Rename assertNotIs to assertIsNot
- Extract parts of implementation to helper internal PublishedApi
functions in order to inline minimum amount of code at use sites
- Remove PublishedApi from messagePrefix, no longer needed
2021-03-17 17:53:54 +03:00
Ben Asher
3a0219d84c
kotlin-test: add assertIs and assertNotIs assertions KT-45296
2021-03-17 17:53:54 +03:00
Abduqodiri Qurbonzoda
5f4a4fd8ae
Introduce assertContentEquals in kotlin-test #KT-32996
2021-03-12 09:24:15 +03:00
Ilya Gorbunov
ca99fc4fed
Make more lambda-taking functions in kotlin-test inline-only
...
So that the lambda can contain non-local control flow, such as suspend
calls. Inline-only helps preserving line numbers in the failed assertion
stack traces.
KT-44717
2021-03-10 12:15:45 +03:00
Ilya Gorbunov
1a32fdf6d7
Add EXACTLY_ONCE contract to functions that call their lambda parameter once
...
KT-35972
2020-07-10 01:05:16 +03:00
Ilya Gorbunov
b55729957e
Drop previously deprecated API
...
- common and JS org.junit.Test from kotlin.test
- kotlin.Synchronized/Volatile from K/JS
- JS 'native' annotation
2020-06-22 12:29:25 +03:00
Ilya Gorbunov
e9c4f531eb
Increase deprecation level for previously deprecated API
...
- unsupported common exceptions
- common 'synchronized'
- jquery API
- experimental kotlin.time API
- js Math object
- DefaultAsserter constructor-like fun
2020-06-22 12:29:24 +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
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
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
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
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
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
Ilya Gorbunov
8fd8310033
Build and package kotlin-test-js with gradle
2017-04-06 20:32:37 +03:00
Ilya Gorbunov
08fa304b6f
Build common standard library headers and kotlin-test (common and jvm) as multiplatform projects.
2017-04-06 20:32:37 +03:00
Ilya Gorbunov
7d9554b6b8
Remove sources.xml and maven-assembly-plugin execution.
2017-01-24 19:39:05 +03:00
Ilya Gorbunov
9b9852cdc9
kotlin-test: rename shared module to common.
...
Do not use shared kotlin-test while building js stdlib.
2017-01-24 19:39:05 +03:00