From: Chris Hanson Date: Sun, 27 Sep 2009 04:04:16 +0000 (-0700) Subject: Add notices and comments to test files. X-Git-Tag: 20100708-Gtk~310 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a424d760119cb4924a2afcaa9466a080a735bebf;p=mit-scheme.git Add notices and comments to test files. --- diff --git a/tests/runtime/test-boyer-moore.scm b/tests/runtime/test-boyer-moore.scm index 6e8ce6489..acd6fc879 100644 --- a/tests/runtime/test-boyer-moore.scm +++ b/tests/runtime/test-boyer-moore.scm @@ -1,25 +1,29 @@ #| -*-Scheme-*- -$Id$ +Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006, 2007, 2008, 2009 Massachusetts Institute of Technology -Copyright (c) 1999 Massachusetts Institute of Technology +This file is part of MIT/GNU Scheme. -This program is free software; you can redistribute it and/or modify +MIT/GNU Scheme is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, but +MIT/GNU Scheme 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 General Public License for more details. You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +along with MIT/GNU Scheme; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, +USA. + |# -;;;; Test code for Boyer-Moore String Search +;;;; Tests for Boyer-Moore String Search (declare (usual-integrations)) diff --git a/tests/runtime/test-hash-table.scm b/tests/runtime/test-hash-table.scm index d6302381f..89b5666cb 100644 --- a/tests/runtime/test-hash-table.scm +++ b/tests/runtime/test-hash-table.scm @@ -1,5 +1,32 @@ -(declare (usual-integrations)) +#| -*-Scheme-*- + +Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006, 2007, 2008, 2009 Massachusetts Institute of Technology + +This file is part of MIT/GNU Scheme. + +MIT/GNU Scheme is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +MIT/GNU Scheme 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 +General Public License for more details. +You should have received a copy of the GNU General Public License +along with MIT/GNU Scheme; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, +USA. + +|# + +;;;; Tests of hash-table implementation + +(declare (usual-integrations)) + (define-structure (implementation (conc-name implementation/)) (make #f read-only #t) (insert! #f read-only #t) diff --git a/tests/runtime/test-mime-codec.scm b/tests/runtime/test-mime-codec.scm index 63c925640..bf9455a92 100644 --- a/tests/runtime/test-mime-codec.scm +++ b/tests/runtime/test-mime-codec.scm @@ -1,3 +1,32 @@ +#| -*-Scheme-*- + +Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006, 2007, 2008, 2009 Massachusetts Institute of Technology + +This file is part of MIT/GNU Scheme. + +MIT/GNU Scheme is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +MIT/GNU Scheme 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 +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with MIT/GNU Scheme; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, +USA. + +|# + +;;;; Tests of MIME codecs + +(declare (usual-integrations)) + (define (test-encoder n-packets packet-length text? filename initialize finalize update) (call-with-output-file filename diff --git a/tests/runtime/test-random.scm b/tests/runtime/test-random.scm index 36aea8e8e..088cb86a5 100644 --- a/tests/runtime/test-random.scm +++ b/tests/runtime/test-random.scm @@ -1,3 +1,32 @@ +d#| -*-Scheme-*- + +Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006, 2007, 2008, 2009 Massachusetts Institute of Technology + +This file is part of MIT/GNU Scheme. + +MIT/GNU Scheme is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +MIT/GNU Scheme 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 +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with MIT/GNU Scheme; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, +USA. + +|# + +;;;; Tests of random-number generator + +(declare (usual-integrations)) + (define (fill-file-with-random-integers n-bits-in-file n-bits-per-integer n-progress-dots diff --git a/tests/runtime/test-regsexp.scm b/tests/runtime/test-regsexp.scm index b6a696a7d..a455d2af4 100644 --- a/tests/runtime/test-regsexp.scm +++ b/tests/runtime/test-regsexp.scm @@ -1,3 +1,32 @@ +#| -*-Scheme-*- + +Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006, 2007, 2008, 2009 Massachusetts Institute of Technology + +This file is part of MIT/GNU Scheme. + +MIT/GNU Scheme is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +MIT/GNU Scheme 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 +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with MIT/GNU Scheme; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, +USA. + +|# + +;;;; Tests of regular s-expressions + +(declare (usual-integrations)) + (define (test-string pattern string expected) (assert-equal `(match-string ',pattern ,string) (match-string pattern string) diff --git a/tests/runtime/test-srfi-1.scm b/tests/runtime/test-srfi-1.scm index a645831cc..cef04774f 100644 --- a/tests/runtime/test-srfi-1.scm +++ b/tests/runtime/test-srfi-1.scm @@ -1,3 +1,32 @@ +#| -*-Scheme-*- + +Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006, 2007, 2008, 2009 Massachusetts Institute of Technology + +This file is part of MIT/GNU Scheme. + +MIT/GNU Scheme is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +MIT/GNU Scheme 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 +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with MIT/GNU Scheme; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, +USA. + +|# + +;;;; Informal tests of SRFI-1 implementation + +(declare (usual-integrations)) + ;;; xcons (xcons (list 1) 2) ;Value 1: (2 1) diff --git a/tests/runtime/test-stream.scm b/tests/runtime/test-stream.scm index 5bd186954..2fb1d40f2 100644 --- a/tests/runtime/test-stream.scm +++ b/tests/runtime/test-stream.scm @@ -1,13 +1,32 @@ -(define (file-stream filename) - (let ((port (open-input-file filename))) - (let loop () - (let ((char (read-char port))) - (if (eof-object? char) - (begin - (close-port port) - '()) - (cons-stream char (loop))))))) +#| -*-Scheme-*- + +Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006, 2007, 2008, 2009 Massachusetts Institute of Technology + +This file is part of MIT/GNU Scheme. + +MIT/GNU Scheme is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +MIT/GNU Scheme 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 +General Public License for more details. +You should have received a copy of the GNU General Public License +along with MIT/GNU Scheme; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, +USA. + +|# + +;;;; Test that long streams don't leak memory + +(declare (usual-integrations)) + (define (run-tests filename) (toggle-gc-notification!) (stream-length (file-stream filename)) @@ -15,4 +34,12 @@ (stream-for-each (lambda (x) x) (file-stream filename)) (toggle-gc-notification!)) -(run-tests "~/gunk/receiver/chip1/receiver/qrm-1.sim") \ No newline at end of file +(define (file-stream filename) + (let ((port (open-input-file filename))) + (let loop () + (let ((char (read-char port))) + (if (eof-object? char) + (begin + (close-port port) + '()) + (cons-stream char (loop))))))) \ No newline at end of file diff --git a/tests/runtime/test-string-copy.scm b/tests/runtime/test-string-copy.scm index 8bd05b94c..13d9e0695 100644 --- a/tests/runtime/test-string-copy.scm +++ b/tests/runtime/test-string-copy.scm @@ -1,5 +1,32 @@ -(declare (usual-integrations)) +#| -*-Scheme-*- + +Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006, 2007, 2008, 2009 Massachusetts Institute of Technology + +This file is part of MIT/GNU Scheme. + +MIT/GNU Scheme is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +MIT/GNU Scheme 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 +General Public License for more details. +You should have received a copy of the GNU General Public License +along with MIT/GNU Scheme; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, +USA. + +|# + +;;;; Tests of string copying performance + +(declare (usual-integrations)) + (define (test-noop length iterations) (let ((from (make-string length)) (to (make-string (fix:* 2 length))))