File tree 2 files changed +12
-0
lines changed 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ module {
13
13
public func printStatus() {
14
14
let total = debug_show (_pass + _fail);
15
15
debugPrint("🟢 " # debug_show (_pass) # "/" # total # " | 🛑 " # debug_show (_fail) # "/" # total # " \n " );
16
+ switch (_fail) {
17
+ case (0 ) {};
18
+ case (_) assert (false );
19
+ };
16
20
};
17
21
};
18
22
};
Original file line number Diff line number Diff line change @@ -39,10 +39,18 @@ module {
39
39
#Test (name, func (state : T , print : (t : Text ) -> ()) : Bool = test(state));
40
40
};
41
41
42
+ public func its< T > (name : Text , test : (state : T ) -> async * Bool ) : NamedTest < T > {
43
+ #TestAsync (name, func (state : T , print : (t : Text ) -> ()) : async * Bool { await * test(state) });
44
+ };
45
+
42
46
public func itp< T > (name : Text , test : Test < T > ) : NamedTest < T > {
43
47
#Test (name, test);
44
48
};
45
49
50
+ public func itsp< T > (name : Text , test : TestAsync < T > ) : NamedTest < T > {
51
+ #TestAsync (name, test);
52
+ };
53
+
46
54
private func doNothing< T > () : Testing < T > { func (_ : T ) {} };
47
55
48
56
public class Suite < T > (state : T ) {
You can’t perform that action at this time.
0 commit comments