diff options
| author | Timothee Cour <timothee.cour2@gmail.com> | 2019-01-29 21:06:26 -0800 |
|---|---|---|
| committer | genotrance <dev@genotrance.com> | 2019-01-29 23:06:26 -0600 |
| commit | 839c4007f6a9e2b820be152df64f5f602535e18f (patch) | |
| tree | 33449e98551a36285bc794c97f3f88aaf829370c /tests | |
| parent | 70deda95b795f7fbc9002cf3bf08d4ad8b0a5aa2 (diff) | |
| download | nimterop-839c4007f6a9e2b820be152df64f5f602535e18f.tar.gz nimterop-839c4007f6a9e2b820be152df64f5f602535e18f.zip | |
fix #62 (toast now addressed relatively); macros=>procs + other fixes (#70)
* fixes https://github.com/genotrance/nimterop/issues/62
* toast is now automatically built on demand, and doesn't depend on PATH
- [ ] todo: need to track its deps properly to trigger rebuilding it; using same algo as shown here https://github.com/genotrance/nimterop/issues/69 but using nim deps instead of c deps
* many other fixes
* trying to follow https://github.com/timotheecour/vitanim/wiki/Nim-best-practices
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/tnimterop_c.nim | 11 | ||||
| -rw-r--r-- | tests/tsoloud.nim | 12 |
2 files changed, 13 insertions, 10 deletions
diff --git a/tests/tnimterop_c.nim b/tests/tnimterop_c.nim index ece78db..eca3324 100644 --- a/tests/tnimterop_c.nim +++ b/tests/tnimterop_c.nim @@ -67,9 +67,11 @@ s1.field1 = 5 s2.field1 = 6 s3.field1 = 7 s4.field2[2] = 5 + +# note: simplify with `defined(c)` for nim >= 0.19.9 when defined(cpp): - discard # TODO -else: # TODO: what's `defined(cpp)` for c ? + discard +else: s4.field3[3] = enum1 s5.tci = test_call_int @@ -92,9 +94,9 @@ check test_call_int() == 5 check test_call_param(5).field1 == 5 check test_call_param2(5, s2).field1 == 11 check test_call_param3(5, s1).field1 == 10 -# error: assigning to 'enum ENUM' from incompatible type 'NI' (aka 'long long') when defined(cpp): - discard # TODO + # error: assigning to 'enum ENUM' from incompatible type 'NI' (aka 'long long') + discard else: check test_call_param4(e) == e2 check test_call_param5(5.0).field2 == 5.0 @@ -103,7 +105,6 @@ u.field1 = 4 check test_call_param7(u) == 4 when defined(cpp): - # TODO # note: candidate function not viable: no known conversion from 'NI *' (aka 'long long *') to 'int *' for 1st argument # check test_call_param8(cast[ptr int](addr i)) == 25.0 discard diff --git a/tests/tsoloud.nim b/tests/tsoloud.nim index 8d2143b..2d1c40d 100644 --- a/tests/tsoloud.nim +++ b/tests/tsoloud.nim @@ -1,10 +1,12 @@ -import os, nimterop/[cimport, git] +import os, nimterop/[cimport, git, paths] const - incl = "soloud/include" - src = "soloud/src" + baseDir = nimteropBuildDir()/"soloud" + incl = baseDir/"include" + src = baseDir/"src" -gitPull("https://github.com/jarikomppa/soloud", "soloud", "include/*\nsrc/*\n") +static: + gitPull("https://github.com/jarikomppa/soloud", baseDir, "include/*\nsrc/*\n") cDebug() cDisableCaching() @@ -50,4 +52,4 @@ when declared(WavStream_stop): assert "WavStream_stop() not skipped" when declared(WavStream_setFilter): - assert "WavStream_setFilter not skipped"
\ No newline at end of file + assert "WavStream_setFilter not skipped" |
