Move ReaderExp to its own file
This commit is contained in:
9
projects/nap/src/test/TestMain.hx
Normal file
9
projects/nap/src/test/TestMain.hx
Normal file
@@ -0,0 +1,9 @@
|
||||
package test;
|
||||
|
||||
import kiss.Kiss;
|
||||
import kiss.Prelude;
|
||||
import nap.BoolExpInterp;
|
||||
import nap.Archive;
|
||||
|
||||
@:build(kiss.Kiss.build())
|
||||
class TestMain {}
|
25
projects/nap/src/test/TestMain.kiss
Normal file
25
projects/nap/src/test/TestMain.kiss
Normal file
@@ -0,0 +1,25 @@
|
||||
(defun :Void main []
|
||||
(assert (BoolExpInterp.eval "true" []))
|
||||
(assert !(BoolExpInterp.eval "false" []))
|
||||
(assert !(BoolExpInterp.eval "flag" []))
|
||||
(assert (BoolExpInterp.eval "flag" ["flag"]))
|
||||
(assert !(BoolExpInterp.eval "(and flag false)" ["flag"]))
|
||||
(assert (BoolExpInterp.eval "(or flag otherFlag)" ["otherFlag"]))
|
||||
//trace(error);
|
||||
(let [systems
|
||||
[]
|
||||
archive
|
||||
(new Archive "src/test/example-archive" systems)]
|
||||
(print "TODO")))
|
||||
|
||||
|
||||
|
||||
/*
|
||||
(let [e (new Entry "name")]
|
||||
(dictSet e.components "f" [5])
|
||||
(dictSet e.components "b" [(object c "d")])
|
||||
(let [s (haxe.Json.stringify e)
|
||||
:Entry e2 (haxe.Json.parse s)]
|
||||
// can't call Entry methods on e2
|
||||
(print s))))
|
||||
*/
|
@@ -0,0 +1 @@
|
||||
"Rafael Krux"
|
@@ -0,0 +1 @@
|
||||
"Kevin MacLeod"
|
@@ -0,0 +1 @@
|
||||
"Adventure"
|
@@ -0,0 +1 @@
|
||||
"Ancient Rite"
|
@@ -0,0 +1,4 @@
|
||||
[
|
||||
["song", 1],
|
||||
["western", 1]
|
||||
]
|
@@ -0,0 +1,4 @@
|
||||
[
|
||||
["song", 1],
|
||||
["religious", 1]
|
||||
]
|
11
projects/nap/src/test/example-archive/entries/song1.json
Normal file
11
projects/nap/src/test/example-archive/entries/song1.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "song1",
|
||||
"components": [
|
||||
["Name", "name1"],
|
||||
["Author", "author1"],
|
||||
["Tags", "tags1"]
|
||||
],
|
||||
"files": [
|
||||
"Adventure.mp3"
|
||||
]
|
||||
}
|
11
projects/nap/src/test/example-archive/entries/song2.json
Normal file
11
projects/nap/src/test/example-archive/entries/song2.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "song2",
|
||||
"components": [
|
||||
["Name", "name2"],
|
||||
["Author", "author2"],
|
||||
["Tags", "tags2"]
|
||||
],
|
||||
"files": [
|
||||
"Ancient Rite.mp3"
|
||||
]
|
||||
}
|
BIN
projects/nap/src/test/example-archive/files/Adventure.mp3
Normal file
BIN
projects/nap/src/test/example-archive/files/Adventure.mp3
Normal file
Binary file not shown.
BIN
projects/nap/src/test/example-archive/files/Ancient Rite.mp3
Normal file
BIN
projects/nap/src/test/example-archive/files/Ancient Rite.mp3
Normal file
Binary file not shown.
Reference in New Issue
Block a user