@@ -28,13 +28,13 @@ import scala.quoted.*
28
28
29
29
object Probably :
30
30
protected def general [TestType : Type , ReportType : Type , ResultType : Type ]
31
- (test : Expr [Test [TestType ]],
32
- predicate : Expr [TestType => Boolean ],
33
- runner : Expr [Runner [ReportType ]],
34
- inc : Expr [Inclusion [ReportType , Outcome ]],
35
- inc2 : Expr [Inclusion [ReportType , DebugInfo ]],
36
- action : Expr [TestRun [TestType ] => ResultType ])
37
- (using Quotes )
31
+ (test : Expr [Test [TestType ]],
32
+ predicate : Expr [TestType => Boolean ],
33
+ runner : Expr [Runner [ReportType ]],
34
+ inc : Expr [Inclusion [ReportType , Outcome ]],
35
+ inc2 : Expr [Inclusion [ReportType , DebugInfo ]],
36
+ action : Expr [TestRun [TestType ] => ResultType ])
37
+ (using Quotes )
38
38
: Expr [ResultType ] =
39
39
40
40
import quotes .reflect .*
@@ -61,59 +61,59 @@ object Probably:
61
61
62
62
' {
63
63
assertion[testType, TestType , ReportType , ResultType ]
64
- ($runner, $test, $predicate, $action, $contrast, Some ($expr), $inc, $inc2, $inspectable)
64
+ ($runner, $test, $predicate, $action, $contrast, Some ($expr), $inc, $inc2, $inspectable)
65
65
}
66
66
67
67
case _ =>
68
68
' {
69
69
assertion[TestType , TestType , ReportType , ResultType ]
70
- ($runner, $test, $predicate, $action, Contrastable .nothing[TestType ], None , $inc, $inc2,
70
+ ($runner, $test, $predicate, $action, Contrastable .nothing[TestType ], None , $inc, $inc2,
71
71
_.toString.tt)
72
72
}
73
73
74
74
def check [TestType : Type , ReportType : Type ]
75
- (test : Expr [Test [TestType ]],
76
- predicate : Expr [TestType => Boolean ],
77
- runner : Expr [Runner [ReportType ]],
78
- inc : Expr [Inclusion [ReportType , Outcome ]],
79
- inc2 : Expr [Inclusion [ReportType , DebugInfo ]])
80
- (using Quotes )
75
+ (test : Expr [Test [TestType ]],
76
+ predicate : Expr [TestType => Boolean ],
77
+ runner : Expr [Runner [ReportType ]],
78
+ inc : Expr [Inclusion [ReportType , Outcome ]],
79
+ inc2 : Expr [Inclusion [ReportType , DebugInfo ]])
80
+ (using Quotes )
81
81
: Expr [TestType ] =
82
82
83
83
general[TestType , ReportType , TestType ](test, predicate, runner, inc, inc2, ' { (t : TestRun [TestType ]) => t.get })
84
84
85
85
def assert [TestType : Type , ReportType : Type ]
86
- (test : Expr [Test [TestType ]],
87
- predicate : Expr [TestType => Boolean ],
88
- runner : Expr [Runner [ReportType ]],
89
- inc : Expr [Inclusion [ReportType , Outcome ]],
90
- inc2 : Expr [Inclusion [ReportType , DebugInfo ]])
91
- (using Quotes )
86
+ (test : Expr [Test [TestType ]],
87
+ predicate : Expr [TestType => Boolean ],
88
+ runner : Expr [Runner [ReportType ]],
89
+ inc : Expr [Inclusion [ReportType , Outcome ]],
90
+ inc2 : Expr [Inclusion [ReportType , DebugInfo ]])
91
+ (using Quotes )
92
92
: Expr [Unit ] =
93
93
general[TestType , ReportType , Unit ](test, predicate, runner, inc, inc2, ' { (t : TestRun [TestType ]) => () })
94
94
95
95
def aspire [TestType : Type , ReportType : Type ]
96
- (test : Expr [Test [TestType ]],
97
- runner : Expr [Runner [ReportType ]],
98
- inc : Expr [Inclusion [ReportType , Outcome ]],
99
- inc2 : Expr [Inclusion [ReportType , DebugInfo ]])
100
- (using Quotes )
96
+ (test : Expr [Test [TestType ]],
97
+ runner : Expr [Runner [ReportType ]],
98
+ inc : Expr [Inclusion [ReportType , Outcome ]],
99
+ inc2 : Expr [Inclusion [ReportType , DebugInfo ]])
100
+ (using Quotes )
101
101
: Expr [Unit ] =
102
102
103
103
general[TestType , ReportType , Unit ](test, ' { _ => true }, runner, inc, inc2, ' { (t : TestRun [TestType ]) => () })
104
104
105
105
def succeed : Any => Boolean = (value : Any ) => true
106
106
107
107
def assertion [TestType , TestType2 <: TestType , ReportType , ResultType ]
108
- (runner : Runner [ReportType ],
109
- test : Test [TestType2 ],
110
- predicate : TestType2 => Boolean ,
111
- result : TestRun [TestType2 ] => ResultType ,
112
- contrast : TestType is Contrastable ,
113
- exp : Option [TestType ],
114
- inc : Inclusion [ReportType , Outcome ],
115
- inc2 : Inclusion [ReportType , DebugInfo ],
116
- display : TestType is Inspectable )
108
+ (runner : Runner [ReportType ],
109
+ test : Test [TestType2 ],
110
+ predicate : TestType2 => Boolean ,
111
+ result : TestRun [TestType2 ] => ResultType ,
112
+ contrast : TestType is Contrastable ,
113
+ exp : Option [TestType ],
114
+ inc : Inclusion [ReportType , Outcome ],
115
+ inc2 : Inclusion [ReportType , DebugInfo ],
116
+ display : TestType is Inspectable )
117
117
: ResultType =
118
118
119
119
runner.run(test).pipe: run =>
0 commit comments