diff --git a/assert-r5rs.scm b/assert-r5rs.scm index 335f9dc..060752d 100644 --- a/assert-r5rs.scm +++ b/assert-r5rs.scm @@ -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)) diff --git a/test/assert-test.scm b/test/assert-test.scm index a26e1b3..10eef7b 100644 --- a/test/assert-test.scm +++ b/test/assert-test.scm @@ -248,3 +248,10 @@ "3. item expected:<3> but was:" (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: but was:" + (assert-symbol= 'foo 'bar))