Skip to content

Commit 5f9ab65

Browse files
authored
Merge pull request #294 from willowtreeapps/release/0.22
Prepare release 0.22
2 parents 06faa33 + 8aac13e commit 5f9ab65

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased]
7+
## [0.22] 2020-03-11
88

99
### Added
1010
- Add multi-value support for `Assert<String>.contains()` and `doesNotContain()`
11+
- Add `isEqualByComparingTo` to compare objects by `compareTo` instead of `equals` this is useful for cases like
12+
`BigDecimal` where `equals` would fail because of differing precision.
13+
- Add `containsOnly` for arrays.
1114

1215
### Changed
1316
- Minimum supported kotlin version is 1.3.70
1417
- Updated opentest4j to 1.2.0. This changes the multiple assertion message to include each exception class name.
1518
- Moved `containsAll`, `containsNone`, and `containsOnly` from `Collection` to `Iterable` to make
1619
them a bit more flexible.
20+
- `containsAll`, `containsNone`, and `containsOnly` error messages now include the expected and actual lists.
1721
- Unwrap exceptions thrown by `prop(callable: KCallable<*>)` to make them more clear.
1822
- Add all exception stacktraces to a `MultipleFailuresError` with `Throwable.addSurpressed` on the jvm (used when
1923
collecting multiple exceptions with `assertAll`). Unfortunately, if you are using gradle you won't see this due to a
@@ -29,6 +33,12 @@ known [gradle issue](https://github.com/gradle/gradle/issues/9487).
2933
```
3034
will no longer be caught. But you shouldn't be writing code like that anyway ;)
3135

36+
### Fixed
37+
- Don't let `assertAll` capture `OutOfMemory` errors.
38+
39+
### Breaking Changes
40+
- Previously deprecated methods (as of 0.18) are now errors.
41+
3242
## [0.21] 2020-01-22
3343

3444
### Added

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repositories {
1515
}
1616
1717
dependencies {
18-
testCompile 'com.willowtreeapps.assertk:assertk-jvm:0.21'
18+
testCompile 'com.willowtreeapps.assertk:assertk-jvm:0.22'
1919
}
2020
```
2121

assertk/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ kotlin {
7878
}
7979
}
8080

81-
def opentest4k_version = '1.2.0-SNAPSHOT'
81+
def opentest4k_version = '1.2.0'
8282
def kotlin_coroutines_version = '1.3.4'
8383

8484
sourceSets {

assertk/src/nativeTest/kotlin/test/assertk/NativeAssertAllTest.kt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import kotlin.native.concurrent.Worker
1010
import kotlin.native.concurrent.Future
1111
import kotlin.native.concurrent.TransferMode
1212
import kotlin.test.Test
13+
import kotlin.test.assertEquals
14+
import kotlin.test.assertFails
15+
import kotlin.test.assertFalse
1316

1417
class NativeAssertAllTest {
1518

@@ -35,6 +38,18 @@ class NativeAssertAllTest {
3538
}
3639
}
3740

41+
@Test fun assert_all_does_not_catch_out_of_memory_errors() {
42+
var runs = false
43+
val error = assertFails {
44+
assertAll {
45+
assertThat(1).given { throw OutOfMemoryError() }
46+
runs = true
47+
}
48+
}
49+
assertEquals(OutOfMemoryError::class, error::class)
50+
assertFalse(runs)
51+
}
52+
3853
fun aBunchOfWokers(f: (Worker) -> Future<Unit>) {
3954
val workers = Array(20, { Worker.start() })
4055
val futures = mutableSetOf<Future<Unit>>()

0 commit comments

Comments
 (0)