From d4ea0bbb68d97819f8d4cb892f726638de1777fe Mon Sep 17 00:00:00 2001 From: Quint Daenen Date: Sat, 19 Mar 2022 13:24:55 +0100 Subject: [PATCH] Remove unused T annotation from Suite. --- src/Suite.mo | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Suite.mo b/src/Suite.mo index c19e056..c3d0f21 100644 --- a/src/Suite.mo +++ b/src/Suite.mo @@ -2,33 +2,33 @@ import { debugPrint } = "mo:⛔"; import Testify "Testify"; module { - public type Test = ( + public type Test = ( print : (t : Text) -> () ) -> Bool; - public func equal( + public func equal( testify : Testify.TestifyElement, actual : E - ) : Test = func (print: (t : Text) -> ()) : Bool { + ) : Test = func (print: (t : Text) -> ()) : Bool { let b = testify.equal(testify.element, actual); if (not b) print("💬 expected: " # testify.toText(testify.element) # ", actual: " # testify.toText(actual)); b; }; - public type NamedTest = { - #Describe : (Text, [NamedTest]); - #Test : (Text, Test); + public type NamedTest = { + #Describe : (Text, [NamedTest]); + #Test : (Text, Test); }; - public func describe(name : Text, tests : [NamedTest]) : NamedTest { + public func describe(name : Text, tests : [NamedTest]) : NamedTest { #Describe(name, tests); }; - public func it(name : Text, test : () -> Bool) : NamedTest { + public func it(name : Text, test : () -> Bool) : NamedTest { #Test(name, func (print : (t : Text) -> ()) : Bool = test()); }; - public func itp(name : Text, test : Test) : NamedTest { + public func itp(name : Text, test : Test) : NamedTest { #Test(name, test); }; @@ -47,7 +47,7 @@ module { }; }; - public class Suite(state : T) { + public class Suite() { let s : Status = Status(); var indent = 0; @@ -57,13 +57,13 @@ module { debugPrint(s # t); }; - public func run(tests : [NamedTest]) { + public func run(tests : [NamedTest]) { _run(tests); debugPrint(""); s.printStatus(); }; - private func _run(tests : [NamedTest]) { + private func _run(tests : [NamedTest]) { for (k in tests.keys()) { let t = tests[k]; switch (t) {