From f540b9a751cf116512ba8bef1d676cea90bad8fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 30 Jun 2022 01:12:42 +0200 Subject: Char parse tests, these were broken by strings. --- tests/test/cpp.scm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/test/cpp.scm') diff --git a/tests/test/cpp.scm b/tests/test/cpp.scm index 2cb4266d..2c51f616 100644 --- a/tests/test/cpp.scm +++ b/tests/test/cpp.scm @@ -412,6 +412,14 @@ num)) (run form)))) +(test-group "Characters" + (let ((form "'c'")) + (test-equal '(char "c") (lex form)) + (test-equal #x63 (run form))) + + (let ((form "'\\n'")) + (test-equal '(char (escaped-char "n")) (lex form)) + (test-equal (char->integer #\newline) (run form)))) (test-group "Strings" (test-group "Empty string" -- cgit v1.2.3