summaryrefslogtreecommitdiff
path: root/test-suite/tests/compiler.test
blob: fe9d7765f4a11280eade99ac9849b9e6ef042a7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
;;;; compiler.test --- tests for the compiler      -*- scheme -*-
;;;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1999, 2001, 2006 Free Software Foundation, Inc.
;;;; 
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
;;;; License as published by the Free Software Foundation; either
;;;; version 3 of the License, or (at your option) any later version.
;;;; 
;;;; This library is distributed in the hope that it will be useful,
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;;;; Lesser General Public License for more details.
;;;; 
;;;; You should have received a copy of the GNU Lesser General Public
;;;; License along with this library; if not, write to the Free Software
;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

(define-module (test-suite tests compiler)
  :use-module (test-suite lib)
  :use-module (test-suite guile-test)
  :use-module (system base compile))
  

(with-test-prefix "basic"

  (pass-if "compile to value"
    (equal? (compile 1) 1)))


(with-test-prefix "psyntax"

  (pass-if "redefinition"
    ;; In this case the locally-bound `round' must have the same value as the
    ;; imported `round'.  See the same test in `syntax.test' for details.
    (let ((o1 (compile '(define round round)))
          (o2 (compile '(eq? round (@@ (guile) round)))))
      o2)))