Releases: eed3si9n/expecty
v0.17.0
Notable upgrades in this release:
- Scala Native 0.5
- Scala 3 bumped to LTS (3.3.4)
Notable changes:
- Merge tokens in diffs (#181)
What's Changed
- Lintable expansion by @som-snytt in #161
- Merge adjacent tokens in diffs by @lolgab in #181
- deps: Bump to Scala 3 LTS, fix multi-platform tests by @keynmol in #182
- deps: Update auxlib, clib, javalib, nativelib, ... to 0.5.5 by @scala-steward in #167
- deps: Update sbt-scalajs, scalajs-compiler, ... to 1.12.0 by @scala-steward in #108
Behind the scene
- ci: Update sbt, scripted-plugin to 1.10.5 by @scala-steward in #180
- ci: Update sbt-ci-release to 1.9.0 by @scala-steward in #178
- ci: Update sbt-projectmatrix to 0.10.0 by @scala-steward in #156
- ci: Update sbt-scalafmt to 2.5.2 by @scala-steward in #139
- ci: Update scalafmt-core to 3.8.3 by @scala-steward in #164
- ci: use setup-java instead of deprecated
olafurpg/setup-scala
by @xuwei-k in #146 - ci: remove unnecessary apt install by @xuwei-k in #145
- ci: Add setup-sbt by @eed3si9n in #175
New Contributors
- @som-snytt made their first contribution in #161
- @lolgab made their first contribution in #181
Full Changelog: v0.16.0...v0.17.0
v0.16.0 : version upgrades
Key points
- Fixes bugs related to package name captures during macro-expansion (Scala 3)
- Enables Snapshot releases
- Drops SJS 0.6
- Upgrades Scala 3 to 3.1.2
- Upgrades SN to 0.4.7
- Enables SN/Scala3 combo
What's Changed
- Disable SJS 0.6, SN 0.4.0-M2 and update readme by @keynmol in #53
- Fix relativisation edge-case (Windows) by @Baccata in #56
- Publish on pushes to develop branch by @keynmol in #57
- [bugfix] capturing package names crashes at runtime by @keynmol in #55
- Update sbt-projectmatrix to 0.9.0 by @scala-steward in #63
- bump, bump, bump your versions by @SethTisue in #60
- Update junit-interface to 0.13.3 by @scala-steward in #65
- Update sbt-ci-release to 1.5.7 by @scala-steward in #64
- Update sbt-scalafmt to 2.4.6 by @scala-steward in #72
- Update sbt-ci-release to 1.5.10 by @scala-steward in #77
- Update sbt-scalajs, scalajs-compiler, ... to 1.10.0 by @scala-steward in #79
- Update sbt-scalajs, scalajs-compiler, ... to 1.10.1 by @scala-steward in #84
- Update sbt to 1.7.0 by @scala-steward in #89
- Update sbt to 1.7.1 by @scala-steward in #90
- Enable support for the Scala3/Native combo by @Baccata in #95
New Contributors
- @scala-steward made their first contribution in #63
Full Changelog: v0.15.4...v0.16.0
0.15.4: Fix implicit parameter and conversion capture
0.15.3: Scala 3.0.0 support
Expecty 0.15.3 is cross published to the following build matrix:
Scala Version | JVM | JS (1.x) | JS (0.6.x) | Native (0.4.x) | Native (0.3.x) |
---|---|---|---|---|---|
3.0.0 | ✅ | ✅ | n/a | n/a | n/a |
2.13.x | ✅ | ✅ | ✅ | ✅ | n/a |
2.12.x | ✅ | ✅ | ✅ | ✅ | n/a |
2.11.x | ✅ | ✅ | ✅ | ✅ | ✅ |
Changes
- Maintenance release, upgarding Scala 3 version from 3.0.0-RC2 to 3.0.0
about Expecty
Expecty is a mini library to bring power assert to Scala. Power assert (or power assertion) is a variant of assert(...)
function that that prints out detailed error message automatically. It was originally implemented by Peter Niederwieser for Spock.
scala> val a = 1; val b = 3
val a: Int = 1
val b: Int = 3
scala> import com.eed3si9n.expecty.Expecty.assert
import com.eed3si9n.expecty.Expecty.assert
scala> assert(a * b == 7)
java.lang.AssertionError: assertion failed
assert(a * b == 7)
| | | |
1 3 3 false
at com.eed3si9n.expecty.ExpectyBase$ExpectyListener.expressionRecorded(Expecty.scala:41)
at com.eed3si9n.expecty.RecorderRuntime.recordExpression(RecorderRuntime.scala:40)
... 35 elided
0.15.2: Scala 3.0.0-RC2 support
Expecty 0.15.2 is cross published to the following build matrix:
Scala Version | JVM | JS (1.x) | JS (0.6.x) | Native (0.4.x) | Native (0.3.x) |
---|---|---|---|---|---|
3.0.0-RC2 | ✅ | ✅ | n/a | n/a | n/a |
2.13.x | ✅ | ✅ | ✅ | n/a | n/a |
2.12.x | ✅ | ✅ | ✅ | n/a | n/a |
2.11.x | ✅ | ✅ | ✅ | ✅ | ✅ |
Changes
- Maintenance release, upgarding Scala 3 version from 3.0.0-RC1 to 3.0.0-RC2
about Expecty
Expecty is a mini library to bring power assert to Scala. Power assert (or power assertion) is a variant of assert(...)
function that that prints out detailed error message automatically. It was originally implemented by Peter Niederwieser for Spock.
scala> val a = 1; val b = 3
val a: Int = 1
val b: Int = 3
scala> import com.eed3si9n.expecty.Expecty.assert
import com.eed3si9n.expecty.Expecty.assert
scala> assert(a * b == 7)
java.lang.AssertionError: assertion failed
assert(a * b == 7)
| | | |
1 3 3 false
at com.eed3si9n.expecty.ExpectyBase$ExpectyListener.expressionRecorded(Expecty.scala:41)
at com.eed3si9n.expecty.RecorderRuntime.recordExpression(RecorderRuntime.scala:40)
... 35 elided
0.15.1
Expecty 0.15.1 is cross published to the following build matrix:
Scala Version | JVM | JS (1.x) | JS (0.6.x) | Native (0.4.x) | Native (0.3.x) |
---|---|---|---|---|---|
3.0.0-M3 | ✅ | ✅ | n/a | n/a | n/a |
2.13.x | ✅ | ✅ | ✅ | n/a | n/a |
2.12.x | ✅ | ✅ | ✅ | n/a | n/a |
2.11.x | ✅ | ✅ | ✅ | ✅ | ✅ |
fixes
about Expecty
Expecty is a mini library to bring power assert to Scala. Power assert (or power assertion) is a variant of assert(...)
function that that prints out detailed error message automatically. It was originally implemented by Peter Niederwieser for Spock.
scala> val a = 1; val b = 3
val a: Int = 1
val b: Int = 3
scala> import com.eed3si9n.expecty.Expecty.assert
import com.eed3si9n.expecty.Expecty.assert
scala> assert(a * b == 7)
java.lang.AssertionError: assertion failed
assert(a * b == 7)
| | | |
1 3 3 false
at com.eed3si9n.expecty.ExpectyBase$ExpectyListener.expressionRecorded(Expecty.scala:41)
at com.eed3si9n.expecty.RecorderRuntime.recordExpression(RecorderRuntime.scala:40)
... 35 elided
0.15.0
Expecty 0.15.0 is cross published to the following build matrix:
Scala Version | JVM | JS (1.x) | JS (0.6.x) | Native (0.4.x) | Native (0.3.x) |
---|---|---|---|---|---|
3.0.0-M3 | ✅ | ✅ | n/a | n/a | n/a |
2.13.x | ✅ | ✅ | ✅ | n/a | n/a |
2.12.x | ✅ | ✅ | ✅ | n/a | n/a |
2.11.x | ✅ | ✅ | ✅ | ✅ | ✅ |
Expecty 0.15.0 backports features added to Verify over course of time.
about Expecty
Expecty is a mini library to bring power assert to Scala. Power assert (or power assertion) is a variant of assert(...)
function that that prints out detailed error message automatically. It was originally implemented by Peter Niederwieser for Spock.
scala> val a = 1; val b = 3
val a: Int = 1
val b: Int = 3
scala> import com.eed3si9n.expecty.Expecty.assert
import com.eed3si9n.expecty.Expecty.assert
scala> assert(a * b == 7)
java.lang.AssertionError: assertion failed
assert(a * b == 7)
| | | |
1 3 3 false
at com.eed3si9n.expecty.ExpectyBase$ExpectyListener.expressionRecorded(Expecty.scala:41)
at com.eed3si9n.expecty.RecorderRuntime.recordExpression(RecorderRuntime.scala:40)
... 35 elided
0.14.1
Expecty 0.14.1 is built to Scala 2.11, 2.12, 2.13, 0.27.0-RC1 (Dotty), sjs1_2.11, sjs1_2.12, sjs1_2.13, and native0.3_2.11.
expect(...) takes vararg
Expecty 0.14.1 supports vararg using expect(...)
method.
scala> import com.eed3si9n.expecty.Expecty.expect
import com.eed3si9n.expecty.Expecty.expect
scala> expect(
| "abc".length() == 3,
| "def".length() == 2,
| "fgh".length() == 1,
| )
java.lang.AssertionError: assertion failed
"def".length() == 2,
| |
3 false
at com.eed3si9n.expecty.ExpectyBase$ExpectyListener.expressionRecorded(Expecty.scala:38)
at com.eed3si9n.expecty.RecorderRuntime.recordExpression(RecorderRuntime.scala:39)
... 40 elided
This brings back the multi parameter expect(...)
from older pre-0.12 Expecty, but using vararg instead of block statement.
Source location
Expecty 0.14.1 adds optional source location information.
import com.eed3si9n.expecty.Expecty
val assert = new Expecty { override val showLocation = true }
assert("abc".length() == 2)
This will output:
assertion failed (jvm/src/test/scala/org/expecty/ExpectyLocationSpec.scala:32)
assert("abc".length() == 2)
| |
3 false
Dotty 0.27.0-RC1 support
0.14.0
0.13.0
Expecty 0.13.0 is built to Scala 2.11, 2.12, 2.13, 0.7 (Dotty), sjs0.6_2.11, sjs0.6_2.12, sjs0.6_2.13, and native0.3_2.11.
Generic Recorder[A, R] macro
Expecty internally defines Recorder
macro that records each element in an expression.
Expecty 0.13.0 makes this notion generic as Recorder[A, R]
. This might be used for instance to define a new macro that uses Either
to return the error instead of throwing an AssertionError
exception.
This was contributed by @Baccata as #22