some test files added

This commit is contained in:
Andreas Rumpf 2010-01-08 00:31:57 +01:00
commit a4ba67dd2e
5 changed files with 116 additions and 0 deletions

6
tests/tdeprecated.nim Executable file
View file

@ -0,0 +1,6 @@
var
a {.deprecated.}: array[0..11, int]
a[8] = 1

16
tests/tnewlibs.cfg Executable file
View file

@ -0,0 +1,16 @@
path="$lib/pure"
path="$lib/impure"
path="$lib/newwrap"
path="$lib/newwrap/cairo"
path="$lib/newwrap/gtk"
path="$lib/newwrap/lua"
path="$lib/newwrap/opengl"
path="$lib/newwrap/pcre"
path="$lib/newwrap/sdl"
path="$lib/newwrap/x11"
path="$lib/newwrap/zip"
path="$lib/wrappers/x11"
path="$lib/windows"
path="$lib/posix"
path="$lib/ecmas"

19
tests/tnewlibs.nim Executable file
View file

@ -0,0 +1,19 @@
# Test wether the bindings at least compile...
import
unicode, cgi, terminal, libcurl,
parsexml, parseopt, parsecfg,
osproc,
cairowin32, cairoxlib,
gl, glut, glu, glx, glext, wingl,
lua, lualib, lauxlib, mysql, sqlite3, python, tcl,
sdl, smpeg, sdl_gfx, sdl_net, sdl_mixer, sdl_ttf,
sdl_image, sdl_mixer_nosmpeg,
gtk2, glib2, pango, gdk2
when defined(linux):
import
zlib, zipfiles
writeln(stdout, "test compilation of binding modules")

11
tests/topenarrayrepr.nim Executable file
View file

@ -0,0 +1,11 @@
type
TProc = proc (n: int, m: openarray[int64])
proc Foo(x: int, P: TProc) =
P(x, [ 1'i64 ])
proc Bar(n: int, m: openarray[int64]) =
echo($n & " - " & repr(m))
Foo(5, Bar) #OUT 5 - [1]