~pepe/manisha

ea865fd1bc35e5f841d047c0b4abb7d54b137802 — Josef Pospíšil 2 months ago ddb3d7a
Tune tests
1 files changed, 8 insertions(+), 4 deletions(-)

M test/suite01.janet
M test/suite01.janet => test/suite01.janet +8 -4
@@ 147,7 147,7 @@

(assert (appraise
          ((analyst table? {:name present-string? :age [all number? pos?]})
                    @{:name "" :age -1})
            @{:name "" :age -1})
          tuple? {0 empty?
                  1 (??? struct? {:name function?
                                  :age tuple?})})


@@ 174,8 174,12 @@
(assert-no-error "catch appraise errors"
                 ((??? nil? empty?) nil))

(assert (deep= ((!!! nil? empty?) nil)
               [[] [empty? [:error "expected iterable type, got nil"]]])
(assert (appraise ((!!! nil? empty?) nil)
                  tuple? {0 [all tuple? empty?]
                          1 (??? tuple? {0 (eq empty?)
                                         1 (???
                                             tuple? {0 (eq :error)
                                                     1 (eq "expected iterable type, got nil")})})})
        "catch analyst errors")

[[] [empty? [:error "expected iterable type, got nil"]]]
(end-suite)