Skip to content

Releases: eed3si9n/expecty

v0.17.0

13 Nov 06:53
8e44281
Compare
Choose a tag to compare

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

Behind the scene

New Contributors

Full Changelog: v0.16.0...v0.17.0

v0.16.0 : version upgrades

14 Sep 12:51
cd84025
Compare
Choose a tag to compare

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

New Contributors

Full Changelog: v0.15.4...v0.16.0

0.15.4: Fix implicit parameter and conversion capture

22 Jun 21:06
1a4c23c
Compare
Choose a tag to compare

Changes

This release is a bugfix, mainly revolving around #50

  • #51 Fixed compilation and rendering on Scala 3 when implicit conversions were involved
  • #52 Fixed compilation on Scala 3 when implicit/given parameters were torn apart from other parameter lists

0.15.3: Scala 3.0.0 support

16 May 19:03
090f3b8
Compare
Choose a tag to compare

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

30 Mar 10:10
2bf06fc
Compare
Choose a tag to compare

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

19 Jan 05:14
v0.15.1
Compare
Choose a tag to compare

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

04 Jan 06:01
v0.15.0
a47de19
Compare
Choose a tag to compare

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.

64502316-64856500-d293-11e9-8442-3a7a70d62217

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

07 Oct 02:18
v0.14.1
b819416
Compare
Choose a tag to compare

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.

#29 by @Baccata

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

#28 by @Baccata

Dotty 0.27.0-RC1 support

Dotty 0.27 support ##27 by @Baccata

0.14.0

03 Oct 04:02
v0.14.0
Compare
Choose a tag to compare
0.14.0 Pre-release
Pre-release

0.14.0 had issues, please use 0.14.1.

0.13.0

26 Jul 19:40
v0.13.0
Compare
Choose a tag to compare

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

Dotty 0.7.0-RC1 support

Expecty 0.13.0 adds Dotty 0.7 support #21 by @eed3si9n