commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r8831 - gnuradio/branches/developers/jcorgan/ptrfix/gn


From: jcorgan
Subject: [Commit-gnuradio] r8831 - gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime
Date: Tue, 8 Jul 2008 18:09:19 -0600 (MDT)

Author: jcorgan
Date: 2008-07-08 18:09:17 -0600 (Tue, 08 Jul 2008)
New Revision: 8831

Added:
   
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.cc
   
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.h
Modified:
   
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/Makefile.am
   
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.cc
   
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.h
   
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_runtime.cc
Log:
Failing QA test case

Modified: 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/Makefile.am
       2008-07-08 23:54:37 UTC (rev 8830)
+++ 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/Makefile.am
       2008-07-09 00:09:17 UTC (rev 8831)
@@ -67,6 +67,7 @@
 libruntime_qa_la_SOURCES =                     \
        qa_gr_block.cc                          \
        qa_gr_hier_block2.cc                    \
+       qa_gr_hier_block2_derived.cc            \
        qa_gr_buffer.cc                         \
        qa_gr_flowgraph.cc                      \
        qa_gr_top_block.cc                      \
@@ -117,6 +118,7 @@
        qa_gr_block.h                           \
        qa_gr_flowgraph.h                       \
        qa_gr_hier_block2.h                     \
+       qa_gr_hier_block2_derived.h             \
        qa_gr_buffer.h                          \
        qa_gr_io_signature.h                    \
        qa_gr_top_block.h                       \

Modified: 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.cc
===================================================================
--- 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.cc
      2008-07-08 23:54:37 UTC (rev 8830)
+++ 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.cc
      2008-07-09 00:09:17 UTC (rev 8831)
@@ -44,3 +44,5 @@
     CPPUNIT_ASSERT_EQUAL((int) sizeof(int), 
                         src1->output_signature()->sizeof_stream_item(0));
 }
+
+

Modified: 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.h
===================================================================
--- 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.h
       2008-07-08 23:54:37 UTC (rev 8830)
+++ 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.h
       2008-07-09 00:09:17 UTC (rev 8831)
@@ -32,12 +32,11 @@
     CPPUNIT_TEST_SUITE(qa_gr_hier_block2);
 
     CPPUNIT_TEST(test_make);
-    
+        
     CPPUNIT_TEST_SUITE_END();
 
 private:
     void test_make();
-    void test_derived();
 };
 
 #endif /* INCLUDED_QA_GR_HIER_BLOCK2_H */

Added: 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.cc
===================================================================
--- 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.cc
                              (rev 0)
+++ 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.cc
      2008-07-09 00:09:17 UTC (rev 8831)
@@ -0,0 +1,70 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2008 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 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_derived.h>
+#include <gr_top_block.h>
+#include <gr_io_signature.h>
+#include <gr_null_source.h>
+#include <gr_null_sink.h>
+#include <gr_head.h>
+#include <gr_kludge_copy.h>
+
+gr_derived_block_sptr
+gr_make_derived_block()
+{
+  return gr_derived_block_sptr(new gr_derived_block());
+}
+
+gr_derived_block::gr_derived_block()
+  : gr_hier_block2("gr_derived_block",
+                  gr_make_io_signature(1, 1, sizeof(int)), // Input signature
+                  gr_make_io_signature(1, 1, sizeof(int))) // Output signature
+{
+  gr_block_sptr copy(gr_make_kludge_copy(sizeof(int)));
+
+  connect(shared_from_this(), 0, copy, 0);
+  connect(copy, 0, shared_from_this(), 0);
+}
+
+gr_derived_block::~gr_derived_block()
+{
+}
+
+void qa_gr_hier_block2_derived::test_1()
+{
+  gr_top_block_sptr     tb(gr_make_top_block("test"));
+
+  gr_block_sptr         src(gr_make_null_source(sizeof(int)));
+  gr_block_sptr         head(gr_make_head(sizeof(int), 1000));
+  gr_derived_block_sptr blk(gr_make_derived_block());
+  gr_block_sptr         dst(gr_make_null_sink(sizeof(int)));
+  
+  tb->connect(src,  0, head, 0);
+  tb->connect(head, 0, blk,  0);
+  tb->connect(blk,  0, dst,  0);
+
+  tb->run();
+}

Added: 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.h
===================================================================
--- 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.h
                               (rev 0)
+++ 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.h
       2008-07-09 00:09:17 UTC (rev 8831)
@@ -0,0 +1,57 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2008 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 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_DERIVED_H
+#define INCLUDED_QA_GR_HIER_BLOCK2_DERIVED_H
+
+#include <gr_top_block.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/TestCase.h>
+#include <stdexcept>
+
+// Declare a test C++ hierarchical block
+class gr_derived_block;
+typedef boost::shared_ptr<gr_derived_block> gr_derived_block_sptr;
+gr_derived_block_sptr gr_make_derived_block();
+
+class gr_derived_block : public gr_hier_block2
+{
+private:
+  friend gr_derived_block_sptr gr_make_derived_block();
+  gr_derived_block();
+
+public:
+  ~gr_derived_block();
+};
+
+// Declare a QA test case
+class qa_gr_hier_block2_derived : public CppUnit::TestCase 
+{
+    CPPUNIT_TEST_SUITE(qa_gr_hier_block2_derived);
+    CPPUNIT_TEST(test_1);
+    CPPUNIT_TEST_SUITE_END();
+
+private:
+    void test_1();
+};
+
+#endif /* INCLUDED_QA_GR_HIER_BLOCK2_DERIVED_H */

Modified: 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_runtime.cc
===================================================================
--- 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_runtime.cc
     2008-07-08 23:54:37 UTC (rev 8830)
+++ 
gnuradio/branches/developers/jcorgan/ptrfix/gnuradio-core/src/lib/runtime/qa_runtime.cc
     2008-07-09 00:09:17 UTC (rev 8831)
@@ -36,6 +36,7 @@
 #include <qa_gr_flowgraph.h>
 #include <qa_gr_top_block.h>
 #include <qa_gr_hier_block2.h>
+#include <qa_gr_hier_block2_derived.h>
 #include <qa_gr_buffer.h>
 
 CppUnit::TestSuite *
@@ -49,6 +50,7 @@
   s->addTest (qa_gr_flowgraph::suite ());
   s->addTest (qa_gr_top_block::suite ());
   s->addTest (qa_gr_hier_block2::suite ());
+  s->addTest (qa_gr_hier_block2_derived::suite ());
   s->addTest (qa_gr_buffer::suite ());
   
   return s;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]