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):
|
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 =
|
||||||
|
|
|
||||||
11
test.nim
11
test.nim
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue