aboutsummaryrefslogtreecommitdiff
path: root/tests/test/cpp/util.scm
blob: 8329294a0387aba3393c769db4127a59ea292272 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
(define-module (test cpp util)
  :use-module (srfi srfi-64)
  :use-module (srfi srfi-88)
  :use-module (c cpp-util)
  :use-module ((c lex2) :select (lex lexeme)))

(test-group "Merge string literals"
  (test-equal "To simple strings"
    (list (lexeme type: 'preprocessing-token
                  body: '(string-literal (encoding-prefix) "Hello" "World")))
    (merge-string-literals (lex "\"Hello\"\"World\"")))

  ;; TODO tests with prefixes
  )