Fix proc definition style
This commit is contained in:
parent
c802b8779f
commit
04ffcaccfd
2 changed files with 73 additions and 60 deletions
|
|
@ -19,6 +19,8 @@ import typetraits
|
|||
when not defined(ECMAScript):
|
||||
import terminal
|
||||
|
||||
|
||||
|
||||
# ----------------- Helper Procs and Macros -----------------------------------
|
||||
|
||||
proc `$`*[T](ar: openarray[T]): string =
|
||||
|
|
|
|||
11
test.nim
11
test.nim
|
|
@ -1,5 +1,7 @@
|
|||
import einheit
|
||||
|
||||
|
||||
|
||||
testSuite UnitTests:
|
||||
var
|
||||
testObj: int
|
||||
|
|
@ -58,6 +60,15 @@ testSuite UnitTestsNew:
|
|||
method testMoreMore() =
|
||||
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!
|
||||
testSuite TestInherit of UnitTestsNew:
|
||||
## This will call every test defined in UnitTestsNew
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue