new tester; all tests categorized

This commit is contained in:
Araq 2014-01-13 02:10:03 +01:00
commit 20b5f31c03
481 changed files with 794 additions and 2506 deletions

View file

@ -0,0 +1,20 @@
type
TAnimal=object {.inheritable.}
PAnimal=ref TAnimal
TDog=object of TAnimal
PDog=ref TDog
TCat=object of TAnimal
PCat=ref TCat
TAnimalArray=array[0..2,PAnimal]
proc newDog():PDog = new(result)
proc newCat():PCat = new(result)
proc test(a:openarray[PAnimal])=
echo("dummy")
#test(newDog(),newCat()) #does not work
var myarray:TAnimalArray=[newDog(),newCat(),newDog()] #does not work
#var myarray2:TAnimalArray=[newDog(),newDog(),newDog()] #does not work either