Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Buss committed Sep 20, 2016
1 parent a4a87cd commit b2c3283
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests.crisp
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,12 @@ test '(with 0 . 300000000000000) ()

test '(unfold inc (lambda x asc 5 x) 1) '(1 2 3 4 5)

def desc-powers-of-two reverse (unfold double (lambda x asc 65536 x) 1)

test '(find (lambda x equal 24 (double x)) (4 12 45)) 12
test '(find (lambda x (equal (inc x) 13)) (4 12 45)) 12

def find-first-lt lambda (x l) find (lambda v asc v x) l

test '(find-first-lt 1234 desc-powers-of-two) 1024
test '(find-first-lt 1025 desc-powers-of-two) 1024
test '(find-first-lt 1024 desc-powers-of-two) 512
test '(find-first-lt 3 (5 4 3 2 1)) 2
test '(find-first-lt 2 (1 2 3 4 5)) 1

test '(split-at (1 2 3 4) 3) '((1 2 3) 4)
test '(split-at (1 2 3 4) 0) '(() . (1 2 3 4))
Expand Down

0 comments on commit b2c3283

Please sign in to comment.