summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blossom2010-11-07 23:13:09 -0800
committerEric Blossom2010-11-10 12:17:58 -0800
commit66d6c1b983e48f426b1169be3302407d5116d752 (patch)
treed1e08be9c99fc507afd6d760cdfe607ea852aab4
parent4645f4105f480f6643f3749013c4eabc3f831124 (diff)
downloadgnuradio-66d6c1b983e48f426b1169be3302407d5116d752.tar.gz
gnuradio-66d6c1b983e48f426b1169be3302407d5116d752.tar.bz2
gnuradio-66d6c1b983e48f426b1169be3302407d5116d752.zip
Add not-yet-working test that should confirm exception raised
-rw-r--r--gnuradio-core/src/guile/tests/00_runtime_basics.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/gnuradio-core/src/guile/tests/00_runtime_basics.test b/gnuradio-core/src/guile/tests/00_runtime_basics.test
index 90949c8f8..989ae423c 100644
--- a/gnuradio-core/src/guile/tests/00_runtime_basics.test
+++ b/gnuradio-core/src/guile/tests/00_runtime_basics.test
@@ -96,6 +96,24 @@
(gr:run tb)
(test-equal expected-result (gr:data dst))))
+#!
+;;; FIXME pass-if-exception is broken if the underlying code throws
+;;; (like ours does). Need to write our own test utility for
+;;; exceptions.
+(with-test-prefix "test-connect-5"
+ (let* ((src-data #(-5 -4 -3 -2 -1 0 1 2 3 4 5))
+ (expected-result (vector-map (lambda (x) (* x 2)) src-data))
+ (tb (gr:top-block-swig "QA top block"))
+ (src (gr:vector-source-i src-data #f))
+ (op (gr:multiply-const-ii 2))
+ (dst (gr:vector-sink-i)))
+
+ ;; FIXME This isn't working...
+ (pass-if-exception "bad port" exception:swig-exception
+ (gr:connect tb src op (gr:ep dst 1)))
+
+ ))
+!#
(with-test-prefix "test-io-signature-1"
(let ((ios1 (gr:io-signature 1 2 8))