source: trunk/source/tests/ansi-tests/print-random-state.lsp @ 8991

Last change on this file since 8991 was 8991, checked in by gz, 12 years ago

Check in the gcl ansi test suite (original, in preparation for making local changes)

File size: 599 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Tue May 25 07:15:02 2004
4;;;; Contains: Tests of printing random states
5
6(in-package :cl-test)
7
8(compile-and-load "printer-aux.lsp")
9
10(deftest print.random-state.1
11  (loop repeat 100
12        do (loop repeat 50 do (random 1000))
13        nconc
14        (let* ((rs1 (make-random-state *random-state*))
15               (rs2 (with-standard-io-syntax
16                     (read-from-string
17                      (write-to-string rs1 :readably t))))
18               (result (list (notnot (random-state-p rs2))
19                             (is-similar rs1 rs2))))
20          (unless (equal result '(t t)) (list result rs1 rs2))))
21  nil)
Note: See TracBrowser for help on using the repository browser.