diff options
| author | Ganesh Viswanathan <dev@genotrance.com> | 2020-05-01 15:07:51 -0500 |
|---|---|---|
| committer | Ganesh Viswanathan <dev@genotrance.com> | 2020-05-01 15:07:51 -0500 |
| commit | 748998b0bd921a60f1c05aae7b47eb8de51b7e3e (patch) | |
| tree | fa86e638cb5318cabe6952d8c162a39728a5b4e0 /tests | |
| parent | 568cfc5da6e541101294b956670dddd509dadc2a (diff) | |
| download | nimterop-748998b0bd921a60f1c05aae7b47eb8de51b7e3e.tar.gz nimterop-748998b0bd921a60f1c05aae7b47eb8de51b7e3e.zip | |
Fixes and test lzma/zlib with ast2
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/getheader.nims | 2 | ||||
| -rw-r--r-- | tests/lzma.nim | 8 | ||||
| -rw-r--r-- | tests/tsoloud.nim | 3 | ||||
| -rw-r--r-- | tests/zlib.nim | 6 |
4 files changed, 12 insertions, 7 deletions
diff --git a/tests/getheader.nims b/tests/getheader.nims index 1e8027a..987545a 100644 --- a/tests/getheader.nims +++ b/tests/getheader.nims @@ -14,7 +14,7 @@ proc testCall(cmd, output: string, exitCode: int, delete = true) = doAssert outp.contains(output), outp var - cmd = "nim c -f --hints:off" + cmd = "nim c -f --hints:off -d:FLAGS=\"-f:ast2\"" lrcmd = " -r lzma.nim" zrcmd = " -r zlib.nim" lexp = "liblzma version = " diff --git a/tests/lzma.nim b/tests/lzma.nim index f30b974..cff39de 100644 --- a/tests/lzma.nim +++ b/tests/lzma.nim @@ -3,8 +3,10 @@ import os, strutils import nimterop/[build, cimport] const + FLAGS {.strdefine.} = "" + baseDir = getProjectCacheDir("nimterop" / "tests" / "liblzma") - flags = "--prefix=___,__,_ --suffix=__,_" + tflags = "--prefix=___,__,_ --suffix=__,_ " & FLAGS static: cSkipSymbol(@[ @@ -38,8 +40,8 @@ cOverride: lzma_index_iter = object when not lzmaStatic: - cImport(lzmaPath, recurse = true, dynlib = "lzmaLPath", flags = flags) + cImport(lzmaPath, recurse = true, dynlib = "lzmaLPath", flags = tflags) else: - cImport(lzmaPath, recurse = true, flags = flags) + cImport(lzmaPath, recurse = true, flags = tflags) echo "liblzma version = " & $lzma_version_string() diff --git a/tests/tsoloud.nim b/tests/tsoloud.nim index 8dd197c..4d9a28b 100644 --- a/tests/tsoloud.nim +++ b/tests/tsoloud.nim @@ -1,6 +1,8 @@ import os, nimterop/[cimport, build] const + FLAGS {.strdefine.} = "" + baseDir = getProjectCacheDir("nimterop" / "tests" / "soloud") incl = baseDir/"include" src = baseDir/"src" @@ -42,7 +44,6 @@ cCompile(src/"audiosource", "cpp", exclude="ay/") cCompile(src/"audiosource", "c") cCompile(src/"filter/*.cpp") -const FLAGS {.strdefine.} = "" cImport(incl/"soloud_c.h", flags = FLAGS) var diff --git a/tests/zlib.nim b/tests/zlib.nim index febc6b1..852dca9 100644 --- a/tests/zlib.nim +++ b/tests/zlib.nim @@ -3,6 +3,8 @@ import os, strutils import nimterop/[build, cimport] const + FLAGS {.strdefine.} = "" + baseDir = getProjectCacheDir("nimterop" / "tests" / "zlib") proc zlibPreBuild(outdir, path: string) = @@ -64,8 +66,8 @@ when zlibGit or zlibDL: cIncludeDir(baseDir / "buildcache") when not zlibStatic: - cImport(zlibPath, recurse = true, dynlib = "zlibLPath") + cImport(zlibPath, recurse = true, dynlib = "zlibLPath", flags = FLAGS) else: - cImport(zlibPath, recurse = true) + cImport(zlibPath, recurse = true, flags = FLAGS) echo "zlib version = " & $zlibVersion() |
