Fix proc definition style

This commit is contained in:
Joey Payne 2016-06-18 09:15:27 -06:00
commit 04ffcaccfd
2 changed files with 73 additions and 60 deletions

View file

@ -19,6 +19,8 @@ import typetraits
when not defined(ECMAScript): when not defined(ECMAScript):
import terminal import terminal
# ----------------- Helper Procs and Macros ----------------------------------- # ----------------- Helper Procs and Macros -----------------------------------
proc `$`*[T](ar: openarray[T]): string = proc `$`*[T](ar: openarray[T]): string =

View file

@ -1,5 +1,7 @@
import einheit import einheit
testSuite UnitTests: testSuite UnitTests:
var var
testObj: int testObj: int
@ -58,6 +60,15 @@ testSuite UnitTestsNew:
method testMoreMore() = method testMoreMore() =
self.check(self.returnTrue()) self.check(self.returnTrue())
method testValues() =
proc foo : int =
return 1
proc bar : int =
return 2
let (a, b) = (123, 321)
self.check(a == b and foo() == bar())
# Inheritance! # Inheritance!
testSuite TestInherit of UnitTestsNew: testSuite TestInherit of UnitTestsNew:
## This will call every test defined in UnitTestsNew ## This will call every test defined in UnitTestsNew