diff --git a/assets/logo.png b/assets/logo.png index 39a88567..a2df60db 100644 Binary files a/assets/logo.png and b/assets/logo.png differ diff --git a/features/discipline.html b/features/discipline.html index 790607b5..818fa2e4 100644 --- a/features/discipline.html +++ b/features/discipline.html @@ -143,12 +143,12 @@

SBT

-
libraryDependencies +=  "com.disneystreaming" %% "weaver-discipline" % "0.0-b4f318a-SNAPSHOT" % Test
+
libraryDependencies +=  "com.disneystreaming" %% "weaver-discipline" % "0.0-96f06dc-SNAPSHOT" % Test

Mill

object test extends Tests {
   def ivyDeps = Agg(
-    ivy"com.disneystreaming::weaver-discipline:0.0-b4f318a-SNAPSHOT"
+    ivy"com.disneystreaming::weaver-discipline:0.0-96f06dc-SNAPSHOT"
   )
 }
@@ -164,14 +164,14 @@

 repl.MdocSessionMdocAppDisciplineTests
-Int: eq.antisymmetry eq 31ms
-Int: eq.reflexivity eq 5ms
-Int: eq.symmetry eq 10ms
-Int: eq.transitivity eq 11ms
-Boolean: eq.antisymmetry eq 5ms
-Boolean: eq.reflexivity eq 2ms
+Int: eq.antisymmetry eq 28ms
+Int: eq.reflexivity eq 4ms
+Int: eq.symmetry eq 6ms
+Int: eq.transitivity eq 7ms
+Boolean: eq.antisymmetry eq 4ms
+Boolean: eq.reflexivity eq 1ms
 Boolean: eq.symmetry eq 2ms
-Boolean: eq.transitivity eq 3ms
+Boolean: eq.transitivity eq 2ms
 
 Total 8, Failed 0, Passed 8, Ignored 0, Cancelled 0
 
diff --git a/features/expectations.html b/features/expectations.html index 0f56f477..3f48c8ac 100644 --- a/features/expectations.html +++ b/features/expectations.html @@ -335,35 +335,35 @@

Example suite report

 repl.MdocSessionMdocAppExpectationsSuite
-Simple expectations (success) 27ms
-And/Or composition (success) 23ms
+Simple expectations (success) 22ms
+And/Or composition (success) 30ms
 Varargs composition (success) 0ms
-Working with collections (success) 17ms
-Strict equality (success) 7ms
+Working with collections (success) 22ms
+Strict equality (success) 9ms
 Relaxed equality comparison (success) 1ms
-Simple expectations (failure) 29ms
+Simple expectations (failure) 31ms
 And/Or composition (failure) 31ms
-Varargs composition (failure) 3ms
+Varargs composition (failure) 6ms
 Working with collections (failure 1) 15ms
-Working with collections (failure 2) 4ms
-Strict equality (failure 1) 8ms
-Strict equality (failure 2) 3ms
-Strict equality (failure 3) 0ms
-Relaxed equality comparison (failure) 2ms
+Working with collections (failure 2) 8ms
+Strict equality (failure 1) 5ms
+Strict equality (failure 2) 4ms
+Strict equality (failure 3) 1ms
+Relaxed equality comparison (failure) 1ms
 Non macro-based expectations 0ms
 Failing fast expectations 7ms
 
 *************FAILURES*************
 repl.MdocSessionMdocAppExpectationsSuite
-Simple expectations (failure) 29ms
  assertion failed (expectations.md:33)

  expect(A.B.C.test(z) % 7 == 0)
               |    |  |   |
               20   15 6   false
+Simple expectations (failure) 31ms
  assertion failed (expectations.md:33)

  expect(A.B.C.test(z) % 7 == 0)
               |    |  |   |
               20   15 6   false
And/Or composition (failure) 31ms
 [0] assertion failed (expectations.md:42)
 [0] 
 [0] (expect(1 != 2) and expect(2 == 1)) or expect(2 == 3)


 [1] assertion failed (expectations.md:42)
 [1] 
 [1] (expect(1 != 2) and expect(2 == 1)) or expect(2 == 3)
-Varargs composition (failure) 3ms
  assertion failed (expectations.md:52)

  expect.all(1 + 1 == 2, 2 + 2 == 5, 4 * 2 == 8)
+Varargs composition (failure) 6ms
  assertion failed (expectations.md:52)

  expect.all(1 + 1 == 2, 2 + 2 == 5, 4 * 2 == 8)
Working with collections (failure 1) 15ms
  Values not equal: (expectations.md:63)

  
[world]  |  [hello] -Working with collections (failure 2) 4ms
  assertion failed (expectations.md:67)

  exists(Option(39))(i => expect(i > 50))
                                 | |
                                 | false
                                 39
-Strict equality (failure 1) 8ms
  Values not equal: (expectations.md:82)

  
[hello]  |  [world] -Strict equality (failure 2) 3ms
  Values not equal: (expectations.md:86)

  
List(1, [2], 3)  |  List(1, [19], 3) -Strict equality (failure 3) 0ms
  Values not equal: (expectations.md:90)

  
Test([25].0)  |  Test([50].0) -Relaxed equality comparison (failure) 2ms
  Values not equal: (expectations.md:110)

  
Hello to [25].0  |  Hello to [50].0 +Working with collections (failure 2) 8ms
  assertion failed (expectations.md:67)

  exists(Option(39))(i => expect(i > 50))
                                 | |
                                 | false
                                 39
+Strict equality (failure 1) 5ms
  Values not equal: (expectations.md:82)

  
[hello]  |  [world] +Strict equality (failure 2) 4ms
  Values not equal: (expectations.md:86)

  
List(1, [2], 3)  |  List(1, [19], 3) +Strict equality (failure 3) 1ms
  Values not equal: (expectations.md:90)

  
Test([25].0)  |  Test([50].0) +Relaxed equality comparison (failure) 1ms
  Values not equal: (expectations.md:110)

  
Hello to [25].0  |  Hello to [50].0 Non macro-based expectations 0ms
  Condition failed (expectations.md:115) Failing fast expectations 7ms
  assertion failed (expectations.md:121)

  _ <- expect(h.isEmpty).failFast
              | |
              | false
              hello
diff --git a/features/funsuite.html b/features/funsuite.html index 103f1fd7..04d6085e 100644 --- a/features/funsuite.html +++ b/features/funsuite.html @@ -153,7 +153,7 @@

Pure tests

*************FAILURES************* repl.MdocSessionMdocAppCatsFunSuite fails 1ms
  assertion failed (funsuite.md:11)

  test("fails")   { expect(Some(25).contains(5)) }
                           |        |
                           Some(25) false
-throws 0ms
  RuntimeException: oops

  funsuite.md:13                repl.MdocSession$MdocApp$CatsFunSuite$$anonfun$3#apply
  funsuite.md:13                repl.MdocSession$MdocApp$CatsFunSuite$$anonfun$3#apply
  Try.scala:210                 scala.util.Try$#apply
  Test.scala:31                 weaver.Test$#pure
  suites.scala:187              weaver.FunSuiteF#$anonfun$test$1
  suites.scala:197              weaver.FunSuiteF#$anonfun$pureSpec$1
  List.scala:250                scala.collection.immutable.List#map
  List.scala:79                 scala.collection.immutable.List#map
  suites.scala:197              weaver.FunSuiteF#pureSpec
  suites.scala:201              weaver.FunSuiteF#spec
  Runner.scala:33               weaver.Runner#$anonfun$run$5
  Stream.scala:2286             fs2.Stream#$anonfun$parEvalMapActionImpl$10
  ApplicativeError.scala:269    cats.ApplicativeError#catchNonFatal
  ApplicativeError.scala:268    cats.ApplicativeError#catchNonFatal$
  IO.scala:1769                 cats.effect.IO$$anon$5#catchNonFatal
  Stream.scala:2286             fs2.Stream#$anonfun$parEvalMapActionImpl$9
  IOFiber.scala:1204            cats.effect.IOFiber#succeeded
  IOFiber.scala:351             cats.effect.IOFiber#runLoop
  IOFiber.scala:1366            cats.effect.IOFiber#execR
  IOFiber.scala:112             cats.effect.IOFiber#run
  WorkerThread.scala:743        cats.effect.unsafe.WorkerThread#run
+throws 0ms
  RuntimeException: oops

  funsuite.md:13                repl.MdocSession$MdocApp$CatsFunSuite$$anonfun$3#apply
  funsuite.md:13                repl.MdocSession$MdocApp$CatsFunSuite$$anonfun$3#apply
  Try.scala:210                 scala.util.Try$#apply
  Test.scala:31                 weaver.Test$#pure
  suites.scala:187              weaver.FunSuiteF#$anonfun$test$1
  suites.scala:197              weaver.FunSuiteF#$anonfun$pureSpec$1
  List.scala:250                scala.collection.immutable.List#map
  List.scala:79                 scala.collection.immutable.List#map
  suites.scala:197              weaver.FunSuiteF#pureSpec
  suites.scala:201              weaver.FunSuiteF#spec
  Runner.scala:33               weaver.Runner#$anonfun$run$5
  Stream.scala:2344             fs2.Stream#$anonfun$parEvalMapActionImpl$10
  ApplicativeError.scala:269    cats.ApplicativeError#catchNonFatal
  ApplicativeError.scala:268    cats.ApplicativeError#catchNonFatal$
  IO.scala:1769                 cats.effect.IO$$anon$5#catchNonFatal
  Stream.scala:2344             fs2.Stream#$anonfun$parEvalMapActionImpl$9
  IOFiber.scala:1200            cats.effect.IOFiber#succeeded
  IOFiber.scala:351             cats.effect.IOFiber#runLoop
  IOFiber.scala:1362            cats.effect.IOFiber#execR
  IOFiber.scala:112             cats.effect.IOFiber#run
  WorkerThread.scala:743        cats.effect.unsafe.WorkerThread#run
Total 3, Failed 2, Passed 1, Ignored 0, Cancelled 0
diff --git a/features/logging.html b/features/logging.html index a5438920..f1f6b04b 100644 --- a/features/logging.html +++ b/features/logging.html @@ -162,12 +162,12 @@

Logging information

}
 repl.MdocSessionMdocAppLoggedTests
-Good requests lead to good results 4ms
-Just logging some stuff 9ms
+Good requests lead to good results 6ms
+Just logging some stuff 7ms
 
 *************FAILURES*************
 repl.MdocSessionMdocAppLoggedTests
-Just logging some stuff 9ms
  assertion failed (logging.md:20)

  } yield expect(2 + 2 == 5)


    [INFO] 14:16:34 [logging.md:19] oopsie daisy +Just logging some stuff 7ms
  assertion failed (logging.md:20)

  } yield expect(2 + 2 == 5)


    [INFO] 10:05:50 [logging.md:19] oopsie daisy Total 2, Failed 1, Passed 1, Ignored 0, Cancelled 0
diff --git a/features/scalacheck.html b/features/scalacheck.html index 269f92f4..5eeee453 100644 --- a/features/scalacheck.html +++ b/features/scalacheck.html @@ -143,12 +143,12 @@

SBT

-
libraryDependencies +=  "com.disneystreaming" %% "weaver-scalacheck" % "0.0-b4f318a-SNAPSHOT" % Test
+
libraryDependencies +=  "com.disneystreaming" %% "weaver-scalacheck" % "0.0-96f06dc-SNAPSHOT" % Test

Mill

object test extends Tests {
   def ivyDeps = Agg(
-    ivy"com.disneystreaming::weaver-scalacheck:0.0-b4f318a-SNAPSHOT"
+    ivy"com.disneystreaming::weaver-scalacheck:0.0-96f06dc-SNAPSHOT"
   )
 }
@@ -202,14 +202,14 @@

 repl.MdocSessionMdocAppForallExamples
-Single Gen form 112ms
-Multiple Gen form 147ms
-Arbitrary form 150ms
-Failure example 24ms
+Single Gen form 105ms
+Multiple Gen form 112ms
+Arbitrary form 98ms
+Failure example 31ms
 
 *************FAILURES*************
 repl.MdocSessionMdocAppForallExamples
-Failure example 24ms
 [0] Property test failed on try 1 with seed Seed.fromBase64("dnD4iWAO89n6PzwIfEVvYnUVaJ7ipuyCv-spAXB1s3C=") and input (-1084719538,-2147483648) (modules/scalacheck/shared/src/main/scala/weaver/scalacheck/Checkers.scala:194)

 [1] assertion failed (scalacheck.md:53)
 [1] 
 [1] expect(a1 + a2 % 2 == 0)
 [1]        |  | |  |   |
 [1]        |  | |  0   false
 [1]        |  | -2147483648
 [1]        |  -1084719538
 [1]        -1084719538
+Failure example 31ms
 [0] Property test failed on try 1 with seed Seed.fromBase64("-ZZendRo540Y8M0uCluY8mzJ91512kqGwvKIPEEY8xH=") and input (0,-1) (modules/scalacheck/shared/src/main/scala/weaver/scalacheck/Checkers.scala:194)

 [1] assertion failed (scalacheck.md:53)
 [1] 
 [1] expect(a1 + a2 % 2 == 0)
 [1]        |  | |  |   |
 [1]        0  | -1 -1  false
 [1]           -1
Total 4, Failed 1, Passed 3, Ignored 0, Cancelled 0
diff --git a/features/tagging.html b/features/tagging.html index 1e95babb..bc1e195d 100644 --- a/features/tagging.html +++ b/features/tagging.html @@ -161,13 +161,13 @@

Tagging

}
 repl.MdocSessionMdocAppTaggingSuite
-Only on CI 13ms
-Another on CI 12ms
+Only on CI 11ms
+Another on CI 11ms
 
 *************FAILURES*************
 repl.MdocSessionMdocAppTaggingSuite
-Only on CI 13ms
  assertion failed (tagging.md:25)

  } yield expect(x == y)
                 | |  |
                 1 |  2
                   false
-Another on CI 12ms
  assertion failed (tagging.md:34)

  } yield expect(x == y)
                 | |  |
                 1 |  2
                   false
+Only on CI 11ms
  assertion failed (tagging.md:25)

  } yield expect(x == y)
                 | |  |
                 1 |  2
                   false
+Another on CI 11ms
  assertion failed (tagging.md:34)

  } yield expect(x == y)
                 | |  |
                 1 |  2
                   false
Total 2, Failed 2, Passed 0, Ignored 0, Cancelled 0
diff --git a/helium/site/laika-helium.css b/helium/site/laika-helium.css index c63b6493..b80e4860 100644 --- a/helium/site/laika-helium.css +++ b/helium/site/laika-helium.css @@ -876,6 +876,13 @@ code .type-name, code .tag-name, code .xml-dtd-tag-name, code .markup-fence { color: var(--syntax-wheel5); } +code .diff-added { + background-color: rgb(0 175 0 / 40%); +} +code .diff-removed { + background-color: rgb(250 0 0 / 40%); +} + ul.toc, .toc ul { diff --git a/overview/installation.html b/overview/installation.html index 46139220..f2518fbd 100644 --- a/overview/installation.html +++ b/overview/installation.html @@ -142,23 +142,23 @@

Installation

SBT (1.9.0+)

Newer versions of SBT have weaver automatically integrated.

-
libraryDependencies +=  "com.disneystreaming" %% "weaver-cats" % "0.0-b4f318a-SNAPSHOT" % Test
+
libraryDependencies +=  "com.disneystreaming" %% "weaver-cats" % "0.0-96f06dc-SNAPSHOT" % Test

SBT (older versions)

Internally, SBT has a hardcoded list of test frameworks it integrates with. weaver must be manually added to this list.

-
libraryDependencies +=  "com.disneystreaming" %% "weaver-cats" % "0.0-b4f318a-SNAPSHOT" % Test
+        
libraryDependencies +=  "com.disneystreaming" %% "weaver-cats" % "0.0-96f06dc-SNAPSHOT" % Test
 testFrameworks += new TestFramework("weaver.framework.CatsEffect")

Mill

object test extends Tests {
   def ivyDeps = Agg(
-    ivy"com.disneystreaming::weaver-cats:0.0-b4f318a-SNAPSHOT"
+    ivy"com.disneystreaming::weaver-cats:0.0-96f06dc-SNAPSHOT"
   )
   def testFramework = "weaver.framework.CatsEffect"
 }

scala-cli

-
//> using lib "com.disneystreaming::weaver-cats:0.0-b4f318a-SNAPSHOT"
+        
//> using lib "com.disneystreaming::weaver-cats:0.0-96f06dc-SNAPSHOT"
 //> using testFramework "weaver.framework.CatsEffect" // this may neccessary if you have other TestFramework on your dependencies

Usage

diff --git a/samples/multiple_suites_failures.html b/samples/multiple_suites_failures.html index 2ccee96b..156305bb 100644 --- a/samples/multiple_suites_failures.html +++ b/samples/multiple_suites_failures.html @@ -164,14 +164,14 @@

Failures

failing test 1 3ms repl.MdocSessionMdocAppMyAnotherSuite -failing test 2 4ms +failing test 2 5ms *************FAILURES************* repl.MdocSessionMdocAppMySuite failing test 1 3ms
  assertion failed (multiple_suites_failures.md:18)

  expect(1 >= 2)
repl.MdocSessionMdocAppMyAnotherSuite -failing test 2 4ms
  assertion failed (multiple_suites_failures.md:34)
 (multiple_suites_failures.md:31)

  def check(x : String) = expect(x.length > 10)
                                 | |      |
                                 | 10     false
                                 RxJTQSuljM
+failing test 2 5ms
  assertion failed (multiple_suites_failures.md:34)
 (multiple_suites_failures.md:31)

  def check(x : String) = expect(x.length > 10)
                                 | |      |
                                 | 10     false
                                 1Q1E5ACGga
Total 2, Failed 2, Passed 0, Ignored 0, Cancelled 0
diff --git a/samples/multiple_suites_logging.html b/samples/multiple_suites_logging.html index 8f2701ff..5ebadcca 100644 --- a/samples/multiple_suites_logging.html +++ b/samples/multiple_suites_logging.html @@ -173,11 +173,11 @@

Logging

logging for success 10ms repl.MdocSessionMdocAppMyAnotherSuite -failure should print logs 13ms +failure should print logs 11ms *************FAILURES************* repl.MdocSessionMdocAppMyAnotherSuite -failure should print logs 13ms
  assertion failed (multiple_suites_logging.md:41)

  } yield expect(x.length > 20)
                 | |      |
                 | 10     false
                 av7QSBdYtT


    [INFO]  14:16:37 [multiple_suites_logging.md:38] Starting the test...
        time    -> 1712585797
        purpose -> docs
    [DEBUG] 14:16:37 [multiple_suites_logging.md:40] Generated random string: av7QSBdYtT +failure should print logs 11ms
  assertion failed (multiple_suites_logging.md:41)

  } yield expect(x.length > 20)
                 | |      |
                 | 10     false
                 DFqY1rDqlJ


    [INFO]  10:05:53 [multiple_suites_logging.md:38] Starting the test...
        time    -> 1713866753
        purpose -> docs
    [DEBUG] 10:05:53 [multiple_suites_logging.md:40] Generated random string: DFqY1rDqlJ Total 2, Failed 1, Passed 1, Ignored 0, Cancelled 0
diff --git a/samples/multiple_suites_success.html b/samples/multiple_suites_success.html index b5f3259f..2041c515 100644 --- a/samples/multiple_suites_success.html +++ b/samples/multiple_suites_success.html @@ -165,10 +165,10 @@

Successes

The report looks like this:

 repl.MdocSessionMdocAppMySuite
-hello side-effects 3ms
+hello side-effects 2ms
 
 repl.MdocSessionMdocAppMyAnotherSuite
-double reversing is identity 3ms
+double reversing is identity 2ms
 
 Total 2, Failed 0, Passed 2, Ignored 0, Cancelled 0