diff options
-rw-r--r-- | gnuradio-core/src/guile/tests/general_ctors.test | 14 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.i | 2 |
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 { |