blob: 0ee8da708c0b7fb0e6c73876cf934aed0ac31715 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
(let [{: equal} (require :lib.equal)
{: describe :end test-end} (require :lib.test)]
(describe "equal()" (fn [t]
(t {:given "two equal tables"
:should "return true"
:expected true
:actual (equal [:orange :apple :pear] [:orange :apple :pear]) })
(t {:given "two different tables"
:should "return false"
:expected false
:actual (equal [:apple :pear] [:orange :apple :pear]) })
(t {:given "equal strings"
:should "be true"
:expected true
:actual (equal :apple :apple) })
(t {:given "different strings"
:should "be false"
:expected false
:actual (equal :apple :pear) })
(t {:given "equal bools"
:should "be true"
:expected true
:actual (equal true true) })
(t {:given "different strings"
:should "be false"
:expected false
:actual (equal true false) })
(test-end))))
|