File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -473,6 +473,8 @@ code fences have been updated to also include the result of evaluating the Scala
473473Another approach consists in embedding fragments of Scala source files that are part of a module which
474474is compiled by your build. For instance, given the following test in file ` src/test/ch/epfl/scala/Usage.scala ` :
475475
476+ {% tabs usage-definition class=tabs-scala-version %}
477+ {% tab 'Scala 2' %}
476478~~~ scala
477479package ch .epfl .scala
478480
@@ -489,6 +491,25 @@ object Usage extends Scalaprops {
489491
490492}
491493~~~
494+ {% endtab %}
495+ {% tab 'Scala 3' %}
496+ ~~~ scala
497+ package ch .epfl .scala
498+
499+ import scalaprops .{Property , Scalaprops }
500+
501+ object Usage extends Scalaprops :
502+
503+ val testDoNothing =
504+ // #do-nothing
505+ Property .forAll: (x : Int ) =>
506+ Example .doNothing(x) == x
507+ // #do-nothing
508+
509+ end Usage
510+ ~~~
511+ {% endtab %}
512+ {% endtabs %}
492513
493514You can embed the fragment surrounded by the ` #do-nothing ` identifiers with the ` @@snip ` Paradox directive,
494515as shown in the ` src/documentation/reference.md ` file:
You can’t perform that action at this time.
0 commit comments