fixed/removed broken/redundant tests

This commit is contained in:
satyr 2010-10-21 12:45:50 +09:00
parent 31746ce692
commit cb9683a7fd
2 changed files with 4 additions and 14 deletions

View File

@ -26,7 +26,9 @@ ok object is extend object, array
eq object[3], 3
# Test `flatten`
eq "#{ flatten [0, [1, 2], 3, [4]] }", "#{ array }"
ay = yes
(ay and= typeof n is 'number') for n in flatten [0, [[1], 2], 3, [4]]
ok ay
# Test `del`
eq 1, del object, 1

View File

@ -23,23 +23,11 @@ func = (num) ->
true
when 1, 3, 5
false
else false
ok func(2)
ok func(6)
ok !func(3)
ok !func(8)
# Should cache the switch value, if anything fancier than a literal.
num = 5
result = switch num += 5
when 5 then false
when 15 then false
when 10 then true
else false
ok result
eq func(8), undefined
# Ensure that trailing switch elses don't get rewritten.