mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-16 18:50:23 +02:00
(stable-sort): New test, exercising empty list
input. As reported by Ales Hvezda.
This commit is contained in:
parent
2081b955ad
commit
d27ae588db
1 changed files with 14 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
;;;; sort.test --- tests Guile's sort functions -*- scheme -*-
|
||||
;;;; Copyright (C) 2003, 2006 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This program is free software; you can redistribute it and/or modify
|
||||
;;;; it under the terms of the GNU General Public License as published by
|
||||
|
@ -63,3 +63,16 @@
|
|||
(v (make-shared-array a (lambda (i) (list (- 999 i) 0)) 1000)))
|
||||
(randomize-vector! v 1000)
|
||||
(sorted? (stable-sort! v <) <))))
|
||||
|
||||
|
||||
;;;
|
||||
;;; stable-sort
|
||||
;;;
|
||||
|
||||
(with-test-prefix "stable-sort"
|
||||
|
||||
;; in guile 1.8.0 and 1.8.1 this test failed, an empty list provoked a
|
||||
;; wrong-type-arg exception (where it shouldn't)
|
||||
(pass-if "empty list"
|
||||
(eq? '() (stable-sort '() <))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue