Commit | Line | Data |
---|---|---|
3de80ed5 AW |
1 | ;;;; compiler.test --- tests for the compiler -*- scheme -*- |
2 | ;;;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1999, 2001, 2006 Free Software Foundation, Inc. | |
3 | ;;;; | |
4 | ;;;; This library is free software; you can redistribute it and/or | |
5 | ;;;; modify it under the terms of the GNU Lesser General Public | |
6 | ;;;; License as published by the Free Software Foundation; either | |
53befeb7 | 7 | ;;;; version 3 of the License, or (at your option) any later version. |
3de80ed5 AW |
8 | ;;;; |
9 | ;;;; This library is distributed in the hope that it will be useful, | |
10 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
12 | ;;;; Lesser General Public License for more details. | |
13 | ;;;; | |
14 | ;;;; You should have received a copy of the GNU Lesser General Public | |
15 | ;;;; License along with this library; if not, write to the Free Software | |
16 | ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
17 | ||
18 | (define-module (test-suite tests compiler) | |
19 | :use-module (test-suite lib) | |
20 | :use-module (test-suite guile-test) | |
68623e8e | 21 | :use-module (system base compile)) |
3de80ed5 AW |
22 | |
23 | ||
68623e8e | 24 | (with-test-prefix "basic" |
3de80ed5 | 25 | |
68623e8e AW |
26 | (pass-if "compile to value" |
27 | (equal? (compile 1) 1))) | |
b9434165 LC |
28 | |
29 | \f | |
30 | (with-test-prefix "psyntax" | |
31 | ||
32 | (pass-if "redefinition" | |
33 | ;; In this case the locally-bound `round' must have the same value as the | |
34 | ;; imported `round'. See the same test in `syntax.test' for details. | |
35 | (let ((o1 (compile '(define round round))) | |
36 | (o2 (compile '(eq? round (@@ (guile) round))))) | |
37 | o2))) |