summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blossom2010-11-07 15:37:04 -0800
committerEric Blossom2010-11-10 12:17:57 -0800
commit8a4a74414804f1ccc1ce748b14f82acff3078806 (patch)
treec6f63d70c5e37f7a255c5dc9f4f38c6b60be16dc
parentedca19393f74f803b2b5a970683d216ef41c05c3 (diff)
downloadgnuradio-8a4a74414804f1ccc1ce748b14f82acff3078806.tar.gz
gnuradio-8a4a74414804f1ccc1ce748b14f82acff3078806.tar.bz2
gnuradio-8a4a74414804f1ccc1ce748b14f82acff3078806.zip
Modify *.test to import correct modules
-rw-r--r--gnuradio-core/src/guile/.gitignore2
-rw-r--r--gnuradio-core/src/guile/00_runtime_basics.test12
-rw-r--r--gnuradio-core/src/guile/00_runtime_ctors.test6
-rw-r--r--gnuradio-core/src/guile/Makefile.am22
-rw-r--r--gnuradio-core/src/guile/filter_ctors.test7
-rw-r--r--gnuradio-core/src/guile/general_ctors.test7
-rw-r--r--gnuradio-core/src/guile/gengen_ctors.test7
-rw-r--r--gnuradio-core/src/guile/gnuradio/test-suite/lib.scm35
-rw-r--r--gnuradio-core/src/guile/hier_ctors.test7
-rw-r--r--gnuradio-core/src/guile/io_ctors.test7
10 files changed, 76 insertions, 36 deletions
diff --git a/gnuradio-core/src/guile/.gitignore b/gnuradio-core/src/guile/.gitignore
index c76800aac..82a29a907 100644
--- a/gnuradio-core/src/guile/.gitignore
+++ b/gnuradio-core/src/guile/.gitignore
@@ -1,4 +1,4 @@
/Makefile
/Makefile.in
/run_guile_tests
-/qa_*.log
+/guile.log
diff --git a/gnuradio-core/src/guile/00_runtime_basics.test b/gnuradio-core/src/guile/00_runtime_basics.test
index a8fcf263b..c9d251268 100644
--- a/gnuradio-core/src/guile/00_runtime_basics.test
+++ b/gnuradio-core/src/guile/00_runtime_basics.test
@@ -21,18 +21,6 @@
(use-modules (gnuradio test-suite lib))
(use-modules (gnuradio core))
(use-modules (oop goops))
-(use-modules (ice-9 syncase))
-;;(use-modules (ice-9 format))
-;;(use-modules (ice-9 pretty-print))
-
-;; (test-equal [name] expected test-expr)
-(define-syntax test-equal
- (syntax-rules ()
- ((_ expected test-expr)
- (pass-if (equal? expected test-expr)))
- ((_ name expected test-exprt)
- (pass-if name (equal? expected test-expr)))))
-
(define (vector-map f v)
(list->vector (map f (vector->list v))))
diff --git a/gnuradio-core/src/guile/00_runtime_ctors.test b/gnuradio-core/src/guile/00_runtime_ctors.test
index 339601bf1..e0a946ab9 100644
--- a/gnuradio-core/src/guile/00_runtime_ctors.test
+++ b/gnuradio-core/src/guile/00_runtime_ctors.test
@@ -1,3 +1,4 @@
+;;; -*- Scheme -*-
;;;
;;; Copyright 2010 Free Software Foundation, Inc.
;;;
@@ -17,10 +18,13 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;;
+;;; If you're using Emacs's Scheme mode:
+;;; (put 'with-test-prefix 'scheme-indent-function 1)
+
+(use-modules (gnuradio test-suite lib))
(use-modules (gnuradio core))
(use-modules (oop goops))
-(load-from-path "srfi/srfi-64") ; unit test library
;;; Add test code for all constructors in these files
;;;
diff --git a/gnuradio-core/src/guile/Makefile.am b/gnuradio-core/src/guile/Makefile.am
index bbb36794e..71ce29067 100644
--- a/gnuradio-core/src/guile/Makefile.am
+++ b/gnuradio-core/src/guile/Makefile.am
@@ -36,16 +36,16 @@ nobase_guile_DATA = \
gnuradio/core.scm \
gnuradio/export-safely.scm \
gnuradio/runtime-shim.scm \
- srfi/srfi-64.scm
+ gnuradio/test-suite/guile-test \
+ gnuradio/test-suite/lib.scm
-# noinst_DATA = \
-# qa_0000_basics.scm \
-# qa_0010_ctor_filter.scm \
-# qa_0010_ctor_general.scm \
-# qa_0010_ctor_gengen.scm \
-# qa_0010_ctor_hier.scm \
-# qa_0010_ctor_io.scm \
-# qa_0010_ctor_runtime.scm
-#
+noinst_DATA = \
+ 00_runtime_basics.test \
+ 00_runtime_ctors.test \
+ filter_ctors.test \
+ general_ctors.test \
+ gengen_ctors.test \
+ hier_ctors.test \
+ io_ctors.test
-CLEANFILES = qa_*.log
+CLEANFILES = guile.log
diff --git a/gnuradio-core/src/guile/filter_ctors.test b/gnuradio-core/src/guile/filter_ctors.test
index 0dd539a8e..040b8ba10 100644
--- a/gnuradio-core/src/guile/filter_ctors.test
+++ b/gnuradio-core/src/guile/filter_ctors.test
@@ -1,3 +1,4 @@
+;;; -*- Scheme -*-
;;;
;;; Copyright 2010 Free Software Foundation, Inc.
;;;
@@ -17,11 +18,13 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;;
+;;; If you're using Emacs's Scheme mode:
+;;; (put 'with-test-prefix 'scheme-indent-function 1)
+
+(use-modules (gnuradio test-suite lib))
(use-modules (gnuradio core))
(use-modules (oop goops))
-(load-from-path "srfi/srfi-64") ; unit test library
-
;;; Add test code for all constructors in these files
;;;
;;; ./filter/gr_adaptive_fir_ccf.h
diff --git a/gnuradio-core/src/guile/general_ctors.test b/gnuradio-core/src/guile/general_ctors.test
index 1531a59de..8d272f768 100644
--- a/gnuradio-core/src/guile/general_ctors.test
+++ b/gnuradio-core/src/guile/general_ctors.test
@@ -1,3 +1,4 @@
+;;; -*- Scheme -*-
;;;
;;; Copyright 2010 Free Software Foundation, Inc.
;;;
@@ -17,11 +18,13 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;;
+;;; If you're using Emacs's Scheme mode:
+;;; (put 'with-test-prefix 'scheme-indent-function 1)
+
+(use-modules (gnuradio test-suite lib))
(use-modules (gnuradio core))
(use-modules (oop goops))
-(load-from-path "srfi/srfi-64") ; unit test library
-
;;; Add test code for all constructors in these files
;;;
;;; ./general/gr_additive_scrambler_bb.h
diff --git a/gnuradio-core/src/guile/gengen_ctors.test b/gnuradio-core/src/guile/gengen_ctors.test
index 8e9c509e8..652556d3f 100644
--- a/gnuradio-core/src/guile/gengen_ctors.test
+++ b/gnuradio-core/src/guile/gengen_ctors.test
@@ -1,3 +1,4 @@
+;;; -*- Scheme -*-
;;;
;;; Copyright 2010 Free Software Foundation, Inc.
;;;
@@ -17,11 +18,13 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;;
+;;; If you're using Emacs's Scheme mode:
+;;; (put 'with-test-prefix 'scheme-indent-function 1)
+
+(use-modules (gnuradio test-suite lib))
(use-modules (gnuradio core))
(use-modules (oop goops))
-(load-from-path "srfi/srfi-64") ; unit test library
-
;;; Add test code for all constructors in these files
;;;
;;; ./gengen/gr_add_cc.h
diff --git a/gnuradio-core/src/guile/gnuradio/test-suite/lib.scm b/gnuradio-core/src/guile/gnuradio/test-suite/lib.scm
index 272fe2f10..b7046a8b0 100644
--- a/gnuradio-core/src/guile/gnuradio/test-suite/lib.scm
+++ b/gnuradio-core/src/guile/gnuradio/test-suite/lib.scm
@@ -19,6 +19,7 @@
(define-module (gnuradio test-suite lib)
:use-module (ice-9 stack-catch)
:use-module (ice-9 regex)
+ :use-module (ice-9 syncase)
:export (
;; Exceptions which are commonly being tested for.
@@ -50,7 +51,13 @@
make-count-reporter print-counts
make-log-reporter
full-reporter
- user-reporter))
+ user-reporter
+
+ ;; srfi-64 compatibility macros
+ test-equal
+ test-eqv
+ test-eq
+))
;;;; If you're using Emacs's Scheme mode:
@@ -557,3 +564,29 @@
(apply full-reporter result name args)))
(set! default-reporter full-reporter)
+
+
+;;; Macros for a bit of compatibility with srfi-64
+;;; (test-equal [name] expected test-expr)
+(define-syntax test-equal
+ (syntax-rules ()
+ ((_ expected test-expr)
+ (pass-if (equal? expected test-expr)))
+ ((_ name expected test-exprt)
+ (pass-if name (equal? expected test-expr)))))
+
+;;; (test-eqv [name] expected test-expr)
+(define-syntax test-eqv
+ (syntax-rules ()
+ ((_ expected test-expr)
+ (pass-if (eqv? expected test-expr)))
+ ((_ name expected test-exprt)
+ (pass-if name (eqv? expected test-expr)))))
+
+;;; (test-eq [name] expected test-expr)
+(define-syntax test-eq
+ (syntax-rules ()
+ ((_ expected test-expr)
+ (pass-if (eq? expected test-expr)))
+ ((_ name expected test-exprt)
+ (pass-if name (eq? expected test-expr)))))
diff --git a/gnuradio-core/src/guile/hier_ctors.test b/gnuradio-core/src/guile/hier_ctors.test
index 14d3f4119..c297fb9dd 100644
--- a/gnuradio-core/src/guile/hier_ctors.test
+++ b/gnuradio-core/src/guile/hier_ctors.test
@@ -1,3 +1,4 @@
+;;; -*- Scheme -*-
;;;
;;; Copyright 2010 Free Software Foundation, Inc.
;;;
@@ -17,11 +18,13 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;;
+;;; If you're using Emacs's Scheme mode:
+;;; (put 'with-test-prefix 'scheme-indent-function 1)
+
+(use-modules (gnuradio test-suite lib))
(use-modules (gnuradio core))
(use-modules (oop goops))
-(load-from-path "srfi/srfi-64") ; unit test library
-
;;; Add test code for all constructors in these files
;;;
;;; ./hier/gr_channel_model.h
diff --git a/gnuradio-core/src/guile/io_ctors.test b/gnuradio-core/src/guile/io_ctors.test
index 95f231091..2001e5fa5 100644
--- a/gnuradio-core/src/guile/io_ctors.test
+++ b/gnuradio-core/src/guile/io_ctors.test
@@ -1,3 +1,4 @@
+;;; -*- Scheme -*-
;;;
;;; Copyright 2010 Free Software Foundation, Inc.
;;;
@@ -17,11 +18,13 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;;
+;;; If you're using Emacs's Scheme mode:
+;;; (put 'with-test-prefix 'scheme-indent-function 1)
+
+(use-modules (gnuradio test-suite lib))
(use-modules (gnuradio core))
(use-modules (oop goops))
-(load-from-path "srfi/srfi-64") ; unit test library
-
;;; Add test code for all constructors in these files
;;;
;;; ./io/gr_file_descriptor_sink.h