Test that typed-array? returns #f with non-array argument
[bpt/guile.git] / test-suite / tests / arrays.test
index 015470c..eed5031 100644 (file)
@@ -1,4 +1,4 @@
-;;;; unif.test --- tests guile's uniform arrays     -*- scheme -*-
+;;;; arrays.test --- tests guile's uniform arrays     -*- scheme -*-
 ;;;;
 ;;;; Copyright 2004, 2006, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
 ;;;;
       (pass-if (eq? #f (typed-array? float    #t)))
       (pass-if (eq? #f (typed-array? double   #t)))
       (pass-if (eq? #f (typed-array? complex  #t)))
-      (pass-if (eq? #t (typed-array? scm      #t))))))
+      (pass-if (eq? #t (typed-array? scm      #t))))
+
+    (with-test-prefix "typed-array? returns #f"
+      (pass-if (eq? #f (typed-array? '(1 2 3) 'c64)))
+      (pass-if (eq? #f (typed-array? '(1 2 3) #t)))
+      (pass-if (eq? #f (typed-array? 99 'c64)))
+      (pass-if (eq? #f (typed-array? 99 #t))))))
 
 ;;;
 ;;; array-equal?