I’m trying to build up a test suite for verifying that the Kotlin stdlib works on ParparVM. Is there an open source suite of unit tests floating around somewhere for the kotlin stdlib that I can use as a starting point?
I’ve poked around the kotlin github repo but haven’t found anything yet that looks like unit tests for the stdlib classes.
Kotlin’s unit tests are the samples.
Some are generated and others are manually added…
I’ve not enough knowledge ti help you out wuth it, but I can point you in this direction…
This file has been truncated.
## Samples for the Standard Library
This project contains samples for the standard library functions.
They are located in the [test](test) source root and each sample is written like a small unit test.
These samples are referenced in the documentation of the standard library functions
with the [`@sample`](https://kotlinlang.org/docs/reference/kotlin-doc.html#block-tags) tag and embedded in the generated documentation as runnable samples.
### Guides for sample authoring
Note that samples, although written as unit tests, are conceptually different from them.
While a unit test usually explores corner cases of a function being tested,
the goal of a sample is to show a common use case of a function.
Please see the existing samples for an inspiration on authoring new ones.
- Do not add `Test` postfix or prefix to the name of a sample container class or sample method.
- There's no hard restriction that each function should get its own sample. Several closely related functions can be illustrated with one sample,
for example one sample can show the usage of `nullsFirst` and `nullsLast` comparators.