diff options
author | Eric Blossom | 2010-11-08 14:03:19 -0800 |
---|---|---|
committer | Eric Blossom | 2010-11-10 12:17:58 -0800 |
commit | 941c9a792f103c48de6157026d08d7b0a6bae227 (patch) | |
tree | dd8836e82f5b4b944dcf215d57898d179e3076e6 /gnuradio-core | |
parent | 95a575c177be15b7d4a8634a071ee11f3fb403f4 (diff) | |
download | gnuradio-941c9a792f103c48de6157026d08d7b0a6bae227.tar.gz gnuradio-941c9a792f103c48de6157026d08d7b0a6bae227.tar.bz2 gnuradio-941c9a792f103c48de6157026d08d7b0a6bae227.zip |
Enable test case & fix (missing throw (std::runtime_error) declaration).
Diffstat (limited to 'gnuradio-core')
-rw-r--r-- | gnuradio-core/src/guile/tests/00_runtime_basics.test | 14 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_top_block.i | 2 |
2 files changed, 3 insertions, 13 deletions
diff --git a/gnuradio-core/src/guile/tests/00_runtime_basics.test b/gnuradio-core/src/guile/tests/00_runtime_basics.test index 15bf9cb3f..18b298f22 100644 --- a/gnuradio-core/src/guile/tests/00_runtime_basics.test +++ b/gnuradio-core/src/guile/tests/00_runtime_basics.test @@ -108,14 +108,6 @@ (gr:connect tb src op (gr:ep dst 1))) )) -#! -;;; FIXME currently triggers core dump. -;;; The problem is that swig isn't paying attention to -;;; this throw declaration: -;;; -;;; gr_top_block.i: -;;; void start() throw (std::runtime_error); -;;; (with-test-prefix "gr_top_block::start throw" (let* ((src-data #(-5 -4 -3 -2 -1 0 1 2 3 4 5)) (expected-result (vector-map (lambda (x) (* x 2)) src-data)) @@ -127,12 +119,10 @@ ;; We deliberately don't connect op's output (gr:connect tb src op) - ;; Which should lead to an exception here... - ;; but currently triggers a core dump. - (pass-if-throw "throws std::runtime_error" #t + ;; Which will lead to an exception here... + (pass-if-throw "throws std::runtime_error" 'swig-exception (gr:run tb)) )) -!# (with-test-prefix "io-signature-1" (let ((ios1 (gr:io-signature 1 2 8)) diff --git a/gnuradio-core/src/lib/runtime/gr_top_block.i b/gnuradio-core/src/lib/runtime/gr_top_block.i index d9adf1e18..f18d8890b 100644 --- a/gnuradio-core/src/lib/runtime/gr_top_block.i +++ b/gnuradio-core/src/lib/runtime/gr_top_block.i @@ -43,7 +43,7 @@ public: void start() throw (std::runtime_error); void stop(); void wait(); - void run(); + void run() throw (std::runtime_error); void lock(); void unlock() throw (std::runtime_error); void dump(); |