File: Module.md

package info (click to toggle)
kotlin 1.3.31%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 109,524 kB
  • sloc: java: 454,753; xml: 18,599; javascript: 10,452; sh: 513; python: 97; makefile: 54; ansic: 4
file content (31 lines) | stat: -rw-r--r-- 1,857 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Module kotlin.test

## kotlin.test

`kotlin.test` library provides [annotations](kotlin.test/index.html#annotations) to mark test functions and a set of [utility functions](kotlin.test/index.html#functions) for performing assertions in tests, 
independently of the test framework being used. 

The test framework is abstracted through the [Asserter][kotlin.test.Asserter] class. 
A basic `Asserter` implementation is provided out of the box. 
Note that the class is not intended to be used directly from tests, 
use instead the top-level assertion functions which delegate to the `Asserter`.

The library consists of the modules:

- `kotlin-test-common` – assertions for use in common code;
- `kotlin-test-annotations-common` – test annotations for use in common code;
- `kotlin-test` – a JVM implementation of assertions from `kotlin-test-common`;
- `kotlin-test-junit` – provides an implementation of [Asserter] on top of JUnit
  and maps the test annotations from `kotlin-test-annotations-common` to JUnit test annotations;
- `kotlin-test-junit5` – provides an implementation of [Asserter] on top of JUnit 5
  and maps the test annotations from `kotlin-test-annotations-common` to JUnit 5 test annotations;
- `kotlin-test-testng` – provides an implementation of [Asserter] on top of TestNG
  and maps the test annotations from `kotlin-test-annotations-common` to TestNG test annotations;
- `kotlin-test-js` – a JS implementation of common test assertions and annotations 
  with the out-of-the-box support for [Jasmine](https://jasmine.github.io/), [Mocha](https://mochajs.org/), 
  and [Jest](https://facebook.github.io/jest/) testing frameworks, and an experimental way to plug in 
  a custom unit testing framework. 

# Package kotlin.test

Annotations to mark test functions and top-level functions for performing assertions in tests.