Update indentation for `if'
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
f25177e9a6
commit
08fbd754b6
@ -81,28 +81,28 @@
|
|||||||
(defn test-branching []
|
(defn test-branching []
|
||||||
"NATIVE: test if branching"
|
"NATIVE: test if branching"
|
||||||
(if true
|
(if true
|
||||||
(assert (= 1 1))
|
(assert (= 1 1))
|
||||||
(assert (= 2 1))))
|
(assert (= 2 1))))
|
||||||
|
|
||||||
|
|
||||||
(defn test-branching-with-do []
|
(defn test-branching-with-do []
|
||||||
"NATIVE: test if branching (multiline)"
|
"NATIVE: test if branching (multiline)"
|
||||||
(if false
|
(if false
|
||||||
(assert (= 2 1))
|
(assert (= 2 1))
|
||||||
(do
|
(do
|
||||||
(assert (= 1 1))
|
(assert (= 1 1))
|
||||||
(assert (= 1 1))
|
(assert (= 1 1))
|
||||||
(assert (= 1 1)))))
|
(assert (= 1 1)))))
|
||||||
|
|
||||||
(defn test-branching-expr-count-with-do []
|
(defn test-branching-expr-count-with-do []
|
||||||
"NATIVE: make sure we execute the right number of expressions in the branch"
|
"NATIVE: make sure we execute the right number of expressions in the branch"
|
||||||
(setv counter 0)
|
(setv counter 0)
|
||||||
(if false
|
(if false
|
||||||
(assert (= 2 1))
|
(assert (= 2 1))
|
||||||
(do
|
(do
|
||||||
(setv counter (+ counter 1))
|
(setv counter (+ counter 1))
|
||||||
(setv counter (+ counter 1))
|
(setv counter (+ counter 1))
|
||||||
(setv counter (+ counter 1))))
|
(setv counter (+ counter 1))))
|
||||||
(assert (= counter 3)))
|
(assert (= counter 3)))
|
||||||
|
|
||||||
|
|
||||||
@ -558,7 +558,7 @@
|
|||||||
(assert (= 1 (let [[x 1]
|
(assert (= 1 (let [[x 1]
|
||||||
[y 2]]
|
[y 2]]
|
||||||
(if true
|
(if true
|
||||||
2)
|
2)
|
||||||
1)))
|
1)))
|
||||||
(assert (= 1 (let [[x 1] [y 2]]
|
(assert (= 1 (let [[x 1] [y 2]]
|
||||||
(do)
|
(do)
|
||||||
@ -583,10 +583,10 @@
|
|||||||
"NATIVE: test nested if"
|
"NATIVE: test nested if"
|
||||||
(for [x (range 10)]
|
(for [x (range 10)]
|
||||||
(if (in "foo" "foobar")
|
(if (in "foo" "foobar")
|
||||||
(do
|
(do
|
||||||
(if true true true))
|
(if true true true))
|
||||||
(do
|
(do
|
||||||
(if false false false)))))
|
(if false false false)))))
|
||||||
|
|
||||||
|
|
||||||
(defn test-eval []
|
(defn test-eval []
|
||||||
|
Loading…
Reference in New Issue
Block a user