diff options
-rw-r--r-- | gnuradio-core/src/guile/gnuradio/test-suite/lib.scm | 13 | ||||
-rw-r--r-- | gnuradio-core/src/guile/tests/general_ctors.test | 8 |
2 files changed, 11 insertions, 10 deletions
diff --git a/gnuradio-core/src/guile/gnuradio/test-suite/lib.scm b/gnuradio-core/src/guile/gnuradio/test-suite/lib.scm index 458e627de..abdc89632 100644 --- a/gnuradio-core/src/guile/gnuradio/test-suite/lib.scm +++ b/gnuradio-core/src/guile/gnuradio/test-suite/lib.scm @@ -20,6 +20,7 @@ :use-module (ice-9 stack-catch) :use-module (ice-9 regex) :use-module (ice-9 syncase) + :use-module (ice-9 format) :export ( ;; Exceptions which are commonly being tested for. @@ -597,9 +598,9 @@ (define-syntax test-equal (syntax-rules () ((_ expected test-expr) - (pass-if (equal? expected test-expr))) + (pass-if (verbose-equal? expected test-expr))) ((_ name expected test-exprt) - (pass-if name (equal? expected test-expr))))) + (pass-if name (verbose-equal? expected test-expr))))) ;;; (test-eqv [name] expected test-expr) (define-syntax test-eqv @@ -616,3 +617,11 @@ (pass-if (eq? expected test-expr))) ((_ name expected test-exprt) (pass-if name (eq? expected test-expr))))) + + +(define-public (verbose-equal? expected actual) + (cond ((equal? expected actual) #t) + (else + (format #t "Expected:\n~y\n" expected) + (format #t "Actual:\n~y\n" actual) + #f))) diff --git a/gnuradio-core/src/guile/tests/general_ctors.test b/gnuradio-core/src/guile/tests/general_ctors.test index ff5ee74fa..244249dd8 100644 --- a/gnuradio-core/src/guile/tests/general_ctors.test +++ b/gnuradio-core/src/guile/tests/general_ctors.test @@ -31,14 +31,6 @@ (use-modules (ice-9 format)) -(define (verbose-equal? expected actual) - (cond ((equal? expected actual) #t) - (else - (format #t "Expected:\n~y\n" expected) - (format #t "Actual:\n~y\n" actual) - #f))) - - ;;; Test complex<float> scalars (pass-if (equal? 5.0+5.0i (gr:complex-scalar-test0))) (pass-if (equal? 1.5+0.5i (gr:complex-scalar-test1 1+1i))) |