summaryrefslogtreecommitdiff
path: root/gnuradio-core/src
diff options
context:
space:
mode:
authorEric Blossom2010-11-08 14:47:27 -0800
committerEric Blossom2010-11-10 12:17:58 -0800
commit0eb9f4f3217dc9a68befab7f205aa2cdc67653f6 (patch)
treee027498231d48095885bfc24aefe64b4d0f8160b /gnuradio-core/src
parent941c9a792f103c48de6157026d08d7b0a6bae227 (diff)
downloadgnuradio-0eb9f4f3217dc9a68befab7f205aa2cdc67653f6.tar.gz
gnuradio-0eb9f4f3217dc9a68befab7f205aa2cdc67653f6.tar.bz2
gnuradio-0eb9f4f3217dc9a68befab7f205aa2cdc67653f6.zip
new test case and fix for problem
Diffstat (limited to 'gnuradio-core/src')
-rw-r--r--gnuradio-core/src/guile/tests/general_ctors.test14
-rw-r--r--gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.i2
2 files changed, 13 insertions, 3 deletions
diff --git a/gnuradio-core/src/guile/tests/general_ctors.test b/gnuradio-core/src/guile/tests/general_ctors.test
index ef2a3e729..a706c827c 100644
--- a/gnuradio-core/src/guile/tests/general_ctors.test
+++ b/gnuradio-core/src/guile/tests/general_ctors.test
@@ -29,9 +29,20 @@
(use-modules (gnuradio core))
(use-modules (oop goops))
+
+;;; Return #t if x is not #f
+(define (true? x)
+ (and x #t))
+
;;; Add test code for all constructors in these files
-;;;
+
;;; ./general/gr_additive_scrambler_bb.h
+(pass-if (true? (gr:additive-scrambler-bb 0 0 0 0)))
+
+;; Here's one that will throw if its arg is 0
+(pass-if (true? (gr:unpack-k-bits-bb 10)))
+(pass-if-throw "confirm throw" #t (true? (gr:unpack-k-bits-bb 0)))
+
;;; ./general/gr_agc2_cc.h
;;; ./general/gr_agc2_ff.h
;;; ./general/gr_agc_cc.h
@@ -142,7 +153,6 @@
;;; ./general/gr_threshold_ff.h
;;; ./general/gr_throttle.h
;;; ./general/gr_uchar_to_float.h
-;;; ./general/gr_unpack_k_bits_bb.h
;;; ./general/gr_vco_f.h
;;; ./general/gr_vector_to_stream.h
;;; ./general/gr_vector_to_streams.h
diff --git a/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.i b/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.i
index 5f9a8f134..2e9aa406b 100644
--- a/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.i
+++ b/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.i
@@ -22,7 +22,7 @@
GR_SWIG_BLOCK_MAGIC(gr,unpack_k_bits_bb)
-gr_unpack_k_bits_bb_sptr gr_make_unpack_k_bits_bb (int k);
+gr_unpack_k_bits_bb_sptr gr_make_unpack_k_bits_bb (int k) throw(std::exception);
class gr_unpack_k_bits_bb : public gr_sync_interpolator
{