source: trunk/source/tests/ansi-tests/ftruncate-aux.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: 545 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Wed Aug 20 06:37:01 2003
4;;;; Contains: Aux. functions for testing FTRUNCATE
5
6(in-package :cl-test)
7
8(defun ftruncate.1-fn ()
9  (loop for n = (- (random 200000)
10                   100000)
11        for d = (1+ (random 10000))
12        for vals = (multiple-value-list (ftruncate n d))
13        for (q r) = vals
14        for n2 = (+ (* q d) r)
15        repeat 100
16        unless (and (eql (length vals) 2)
17                    (floatp q)
18                    (= n n2)
19                    (integerp r)
20                    (if (>= n 0)
21                        (< -1 r d)
22                      (< -1 (- r) d)))
23        collect (list n d q r n2)))
Note: See TracBrowser for help on using the repository browser.