2020-04-05 11:05:18 +00:00
|
|
|
|
|
|
|
(os/mkdir "./tools/afl/unmarshal_testcases/")
|
|
|
|
|
|
|
|
(defn spit-case [n v]
|
|
|
|
(spit
|
|
|
|
(string "./tools/afl/unmarshal_testcases/" (string n))
|
|
|
|
(marshal v make-image-dict)))
|
|
|
|
|
|
|
|
(def cases [
|
|
|
|
nil
|
2020-04-05 22:38:14 +00:00
|
|
|
|
2020-04-05 11:05:18 +00:00
|
|
|
"abc"
|
2020-04-05 22:38:14 +00:00
|
|
|
|
2020-04-05 11:05:18 +00:00
|
|
|
:def
|
2020-04-05 22:38:14 +00:00
|
|
|
|
2020-04-05 11:05:18 +00:00
|
|
|
'hij
|
2020-04-05 22:38:14 +00:00
|
|
|
|
2020-04-05 11:05:18 +00:00
|
|
|
123
|
2020-04-05 22:38:14 +00:00
|
|
|
|
2020-04-05 11:05:18 +00:00
|
|
|
(int/s64 123)
|
|
|
|
|
|
|
|
"7"
|
|
|
|
|
|
|
|
[1 2 3]
|
|
|
|
|
|
|
|
@[1 2 3]
|
|
|
|
|
|
|
|
{:a 123}
|
|
|
|
|
|
|
|
@{:b 'xyz}
|
2020-04-05 22:38:14 +00:00
|
|
|
|
2020-04-05 11:05:18 +00:00
|
|
|
(peg/compile
|
|
|
|
'{:a (* "a" :b "a")
|
|
|
|
:b (* "b" (+ :a 0) "b")
|
|
|
|
:main (* "(" :b ")")})
|
2020-04-05 22:38:14 +00:00
|
|
|
|
2020-04-05 11:05:18 +00:00
|
|
|
(fn f [a] (fn [] {:ab a}))
|
|
|
|
|
|
|
|
(fn f [a] (print "hello world!"))
|
|
|
|
|
|
|
|
(do
|
|
|
|
(defn f [a] (yield) @[1 "2"])
|
|
|
|
(def fb (fiber/new f))
|
|
|
|
(resume fb)
|
|
|
|
fb)
|
|
|
|
])
|
|
|
|
|
|
|
|
(eachk i cases
|
|
|
|
(spit-case i (in cases i)))
|