Skip to content

Commit

Permalink
Merge pull request #1 from bsene/master
Browse files Browse the repository at this point in the history
adding symbol assertion
  • Loading branch information
codecop authored Jun 24, 2024
2 parents 24746fd + 44f5560 commit ca75bab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions assert-r5rs.scm
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@
(define (assert= expected actual)
(assert-equal number->string = expected actual))

(define (assert-symbol= expected actual)
(assert-equal symbol->string symbol=? expected actual))

(define (assert-string= expected actual)
(assert-equal values string=? expected actual))

Expand Down
7 changes: 7 additions & 0 deletions test/assert-test.scm
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,10 @@
"3. item expected:<3> but was:<x>"
(assert-string-list= '("1" ("2") "3" )
'("1" ("2") "x" )))

(test-case "(assert-symbol=) equals symbol"
(assert-symbol= 'foo 'foo))

(test-failure "(assert-symbol=) fails"
"expected:<foo> but was:<bar>"
(assert-symbol= 'foo 'bar))

0 comments on commit ca75bab

Please sign in to comment.