mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-29 18:11:44 +00:00
testament megatest: furher refactorings making more tests green
This commit is contained in:
@@ -4,7 +4,9 @@ collide: unit, thing
|
||||
collide: unit, thing
|
||||
collide: thing, unit
|
||||
collide: thing, thing
|
||||
collide: unit, thing | collide: unit, thing | collide: thing, unit |
|
||||
collide: unit, thing |
|
||||
collide: unit, thing |
|
||||
collide: thing, unit |
|
||||
do nothing
|
||||
'''
|
||||
joinable: false
|
||||
@@ -56,10 +58,10 @@ method collide(a, b: Thing) {.base, inline.} =
|
||||
quit "to override!"
|
||||
|
||||
method collide[T](a: Thing, b: Unit[T]) {.inline.} =
|
||||
write stdout, "collide: thing, unit | "
|
||||
echo "collide: thing, unit |"
|
||||
|
||||
method collide[T](a: Unit[T], b: Thing) {.inline.} =
|
||||
write stdout, "collide: unit, thing | "
|
||||
echo "collide: unit, thing |"
|
||||
|
||||
proc test(a, b: Thing) {.inline.} =
|
||||
collide(a, b)
|
||||
@@ -70,7 +72,6 @@ var
|
||||
collide(bbb, Thing(ccc))
|
||||
test(bbb, ccc)
|
||||
collide(aaa, bbb)
|
||||
echo ""
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user