From a213cbed474164ed31a26fd4dbdbe3f13c293b6e Mon Sep 17 00:00:00 2001
From: Eric Blossom <eb@comsec.com>
Date: Tue, 23 Nov 2010 21:44:15 -0800
Subject: Enable guile test for trellis

---
 gr-trellis/src/lib/trellis.test | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 gr-trellis/src/lib/trellis.test

(limited to 'gr-trellis/src/lib/trellis.test')

diff --git a/gr-trellis/src/lib/trellis.test b/gr-trellis/src/lib/trellis.test
new file mode 100644
index 0000000000..fd650cdf1c
--- /dev/null
+++ b/gr-trellis/src/lib/trellis.test
@@ -0,0 +1,39 @@
+;;; -*- Scheme -*-
+;;;
+;;; Copyright 2010 Free Software Foundation, Inc.
+;;;
+;;; This file is part of GNU Radio
+;;;
+;;; GNU Radio is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3, or (at your option)
+;;; any later version.
+;;;
+;;; GNU Radio is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; 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)
+
+;;; See the comments in gnuradio/test-suite/lib.scm for info on writing tests.
+;;; See also the very end of the file, where the test-equal, test-eqv
+;;; and test-eq macros are defined.
+
+(define-module (test-module)
+  #:use-module (oop goops)
+  #:use-module (gnuradio core)
+  #:use-module (gnuradio test-suite lib)
+  #:duplicates (merge-generics replace check))
+  
+
+;;; See if we can import the module...
+(use-modules (gnuradio trellis))
+
+;;; Now do some real testing, like that in ../python/qa_trellis.py
+
-- 
cgit v1.2.3


From 5c686d0989c961ff1c5d20c3d9de4d86759ca3af Mon Sep 17 00:00:00 2001
From: Eric Blossom <eb@comsec.com>
Date: Tue, 23 Nov 2010 22:26:25 -0800
Subject: Add disabled guile test to trellis

---
 gr-trellis/src/lib/trellis.test | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

(limited to 'gr-trellis/src/lib/trellis.test')

diff --git a/gr-trellis/src/lib/trellis.test b/gr-trellis/src/lib/trellis.test
index fd650cdf1c..d370ab18c4 100644
--- a/gr-trellis/src/lib/trellis.test
+++ b/gr-trellis/src/lib/trellis.test
@@ -36,4 +36,18 @@
 (use-modules (gnuradio trellis))
 
 ;;; Now do some real testing, like that in ../python/qa_trellis.py
+;;; FIXME later.  Other problems to deal with.  Looks like
+;;; I don't understand the constructor to <fsm>
+
+(read-set! keywords 'prefix)
+
+'(with-test-prefix "test-001-fsm"
+  (let* ((I 2)
+	 (S 4)
+	 (O 4)
+	 (NS #(0 2 0 2 1 3 1 3))
+	 (OS #(0 3 3 0 1 2 2 1))
+	 (f (make <fsm> :I I :S S :O O :NS NS :OS OS)))
+    (test-equal (list I S O NS OS)
+		(list (gr:I f) (gr:S f) (gr:O f) (gr:NS f) (gr:OS f)))))
 
-- 
cgit v1.2.3