     b = nonce
   eq nonce, b
 
-# While over break.
-i = 0
-result = while i < 10
-  i++
-  break
-arrayEq result, []
-
-# While over continue.
-i = 0
-result = while i < 10
-  i++
-  continue
-arrayEq result, []
-
-# Until
-
-# TODO: refactor until tests
-# TODO: add until tests
-
-value = false
-i = 0
-results = until value
-  value = true if i is 5
-  i++
-ok i is 6
-
-# Loop
-
-# TODO: refactor loop tests
-# TODO: add loop tests
-
-i = 5
-list = []
-loop
-  i -= 1
-  break if i is 0
-  list.push i * 2
-ok list.join(' ') is '8 6 4 2'
-
-# TODO: refactor for tests
-# TODO: add for tests
+
+test "While over break.", ->
+
+  i = 0
+  result = while i < 10
+    i++
+    break
+  arrayEq result, []
+
+
+test "While over continue.", ->
+
+  i = 0
+  result = while i < 10
+    i++
+    continue
+  arrayEq result, []
+
+
+test "Basic `until`", ->
+
+  value = false
+  i = 0
+  results = until value
+    value = true if i is 5
+    i++
+  ok i is 6
+
+
+test "Basic `loop`", ->
+
+  i = 5
+  list = []
+  loop
+    i -= 1
+    break if i is 0
+    list.push i * 2
+  ok list.join(' ') is '8 6 4 2'
+
 
 test "break at the top level", ->
   for i in [1,2,3]

  eq nonce, result


# For / While / Until / Loop

# TODO: refactor while tests

# While

i = 5
list = while i -= 1
  i * 2
ok list.join(' ') is "8 6 4 2"

i = 5
list = (i * 3 while i -= 1)
ok list.join(' ') is "12 9 6 3"

i = 5
func   = (num) -> i -= num
assert = -> ok i < 5 > 0
results = while func 1
  assert()
  i
ok results.join(' ') is '4 3 2 1'

i = 10
results = while i -= 1 when i % 2 is 0
  i * 2
ok results.join(' ') is '16 12 8 4'

#759: `if` within `while` condition
2 while if 1 then 0

test "assignment inside the condition of a `while` loop", ->
  nonce = {}
  count = 1
  a = nonce while count--

  eq 2, result

test "break *not* at the top level", ->
  someFunc = ->
    i = 0
    while ++i < 3
      result = i
