[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r3877 - gnuradio/branches/developers/jcorgan/hier/gnur
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r3877 - gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime |
Date: |
Fri, 27 Oct 2006 13:50:43 -0600 (MDT) |
Author: jcorgan
Date: 2006-10-27 13:50:43 -0600 (Fri, 27 Oct 2006)
New Revision: 3877
Added:
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.cc
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.h
Modified:
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/Makefile.am
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2.cc
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2.h
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/qa_runtime.cc
Log:
Add QA harness for gr_hier_block2
Modified:
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/Makefile.am
===================================================================
---
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/Makefile.am
2006-10-27 17:54:51 UTC (rev 3876)
+++
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/Makefile.am
2006-10-27 19:50:43 UTC (rev 3877)
@@ -56,6 +56,7 @@
libruntime_qa_la_SOURCES = \
qa_gr_block.cc \
+ qa_gr_hier_block2.cc \
qa_gr_buffer.cc \
qa_gr_io_signature.cc \
qa_gr_vmcircbuf.cc \
@@ -92,6 +93,7 @@
gr_vmcircbuf_sysv_shm.h \
gr_vmcircbuf_createfilemapping.h \
qa_gr_block.h \
+ qa_gr_hier_block2.h \
qa_gr_buffer.h \
qa_gr_io_signature.h \
qa_gr_vmcircbuf.h \
Modified:
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2.cc
2006-10-27 17:54:51 UTC (rev 3876)
+++
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2.cc
2006-10-27 19:50:43 UTC (rev 3877)
@@ -25,21 +25,31 @@
#endif
#include <gr_hier_block2.h>
+#include <iostream>
-gr_hier_block2_sptr gr_make_hier_block2(const std::string name,
+using namespace std;
+
+gr_hier_block2_sptr gr_make_hier_block2(const string name,
gr_io_signature_sptr input_signature,
gr_io_signature_sptr output_signature)
{
+ if (GR_HIER_BLOCK2_DEBUG)
+ cout << "gr_make_hier_block2: entered" << endl;
+
return gr_hier_block2_sptr(new gr_hier_block2(name, input_signature,
output_signature));
}
-gr_hier_block2::gr_hier_block2(const std::string name,
+gr_hier_block2::gr_hier_block2(const string name,
gr_io_signature_sptr input_signature,
gr_io_signature_sptr output_signature)
: gr_basic_block(name, input_signature, output_signature)
{
+ if (GR_HIER_BLOCK2_DEBUG)
+ cout << "gr_hier_block2::gr_hier_block2: constructor" << endl;
}
gr_hier_block2::~gr_hier_block2 ()
{
+ if (GR_HIER_BLOCK2_DEBUG)
+ cout << "gr_hier_block2::~gr_hier_block2: destructor" << endl;
}
Modified:
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2.h
===================================================================
---
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2.h
2006-10-27 17:54:51 UTC (rev 3876)
+++
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2.h
2006-10-27 19:50:43 UTC (rev 3877)
@@ -22,6 +22,9 @@
#ifndef INCLUDED_GR_HIER_BLOCK2_H
#define INCLUDED_GR_HIER_BLOCK2_H
+// Define to 0 to eliminate debugging
+#define GR_HIER_BLOCK2_DEBUG 1
+
#include <gr_basic_block.h>
/*!
Added:
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.cc
(rev 0)
+++
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.cc
2006-10-27 19:50:43 UTC (rev 3877)
@@ -0,0 +1,44 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004 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 2, 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 GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <qa_gr_hier_block2.h>
+#include <gr_hier_block2.h>
+#include <gr_io_signature.h>
+
+void qa_gr_hier_block2::test_make()
+{
+ gr_hier_block2_sptr src1(gr_make_hier_block2("test",
+ gr_make_io_signature(1, 1,
sizeof(int)),
+ gr_make_io_signature(1, 1,
sizeof(int))));
+
+ CPPUNIT_ASSERT(src1);
+ CPPUNIT_ASSERT_EQUAL(std::string("test"), src1->name());
+ CPPUNIT_ASSERT_EQUAL(1, src1->input_signature()->max_streams());
+ CPPUNIT_ASSERT_EQUAL(1, src1->output_signature()->min_streams());
+ CPPUNIT_ASSERT_EQUAL(1, src1->output_signature()->max_streams());
+ CPPUNIT_ASSERT_EQUAL(sizeof(int),
+ src1->output_signature()->sizeof_stream_item(0));
+}
Property changes on:
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.cc
___________________________________________________________________
Name: svn:eol-style
+ native
Added:
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.h
===================================================================
---
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.h
(rev 0)
+++
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.h
2006-10-27 19:50:43 UTC (rev 3877)
@@ -0,0 +1,42 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 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 2, 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 GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_QA_GR_HIER_BLOCK2_H
+#define INCLUDED_QA_GR_HIER_BLOCK2_H
+
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/TestCase.h>
+#include <stdexcept>
+
+class qa_gr_hier_block2 : public CppUnit::TestCase
+{
+ CPPUNIT_TEST_SUITE(qa_gr_hier_block2);
+
+ CPPUNIT_TEST(test_make);
+
+ CPPUNIT_TEST_SUITE_END();
+
+private:
+ void test_make();
+};
+
+#endif /* INCLUDED_QA_GR_HIER_BLOCK2_H */
Property changes on:
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.h
___________________________________________________________________
Name: svn:eol-style
+ native
Modified:
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/qa_runtime.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/qa_runtime.cc
2006-10-27 17:54:51 UTC (rev 3876)
+++
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/qa_runtime.cc
2006-10-27 19:50:43 UTC (rev 3877)
@@ -33,6 +33,7 @@
#include <qa_gr_vmcircbuf.h>
#include <qa_gr_io_signature.h>
#include <qa_gr_block.h>
+#include <qa_gr_hier_block2.h>
#include <qa_gr_buffer.h>
CppUnit::TestSuite *
@@ -43,6 +44,7 @@
s->addTest (qa_gr_vmcircbuf::suite ());
s->addTest (qa_gr_io_signature::suite ());
s->addTest (qa_gr_block::suite ());
+ s->addTest (qa_gr_hier_block2::suite ());
s->addTest (qa_gr_buffer::suite ());
return s;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r3877 - gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime,
jcorgan <=