mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-21 14:55:24 +00:00
some test files added
This commit is contained in:
6
tests/tdeprecated.nim
Executable file
6
tests/tdeprecated.nim
Executable file
@@ -0,0 +1,6 @@
|
||||
var
|
||||
a {.deprecated.}: array[0..11, int]
|
||||
|
||||
a[8] = 1
|
||||
|
||||
|
||||
16
tests/tnewlibs.cfg
Executable file
16
tests/tnewlibs.cfg
Executable 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
19
tests/tnewlibs.nim
Executable 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
11
tests/topenarrayrepr.nim
Executable 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]
|
||||
|
||||
Reference in New Issue
Block a user