summaryrefslogtreecommitdiff
path: root/gruel/src/lib/pmt/qa_pmt_prims.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gruel/src/lib/pmt/qa_pmt_prims.cc')
-rw-r--r--gruel/src/lib/pmt/qa_pmt_prims.cc21
1 files changed, 17 insertions, 4 deletions
diff --git a/gruel/src/lib/pmt/qa_pmt_prims.cc b/gruel/src/lib/pmt/qa_pmt_prims.cc
index 6212b8ea4..3ae4d70b6 100644
--- a/gruel/src/lib/pmt/qa_pmt_prims.cc
+++ b/gruel/src/lib/pmt/qa_pmt_prims.cc
@@ -134,12 +134,24 @@ qa_pmt_prims::test_complexes()
{
pmt_t p1 = pmt_make_rectangular(2, -3);
pmt_t m1 = pmt_make_rectangular(-3, 2);
+ pmt_t p2 = pmt_from_complex(2, -3);
+ pmt_t m2 = pmt_from_complex(-3, 2);
+ pmt_t p3 = pmt_from_complex(std::complex<double>(2, -3));
+ pmt_t m3 = pmt_from_complex(std::complex<double>(-3, 2));
CPPUNIT_ASSERT(!pmt_is_complex(PMT_T));
CPPUNIT_ASSERT(pmt_is_complex(p1));
CPPUNIT_ASSERT(pmt_is_complex(m1));
+ CPPUNIT_ASSERT(pmt_is_complex(p2));
+ CPPUNIT_ASSERT(pmt_is_complex(m2));
+ CPPUNIT_ASSERT(pmt_is_complex(p3));
+ CPPUNIT_ASSERT(pmt_is_complex(m3));
CPPUNIT_ASSERT_THROW(pmt_to_complex(PMT_T), pmt_wrong_type);
CPPUNIT_ASSERT_EQUAL(std::complex<double>(2, -3), pmt_to_complex(p1));
CPPUNIT_ASSERT_EQUAL(std::complex<double>(-3, 2), pmt_to_complex(m1));
+ CPPUNIT_ASSERT_EQUAL(std::complex<double>(2, -3), pmt_to_complex(p2));
+ CPPUNIT_ASSERT_EQUAL(std::complex<double>(-3, 2), pmt_to_complex(m2));
+ CPPUNIT_ASSERT_EQUAL(std::complex<double>(2, -3), pmt_to_complex(p3));
+ CPPUNIT_ASSERT_EQUAL(std::complex<double>(-3, 2), pmt_to_complex(m3));
CPPUNIT_ASSERT_EQUAL(std::complex<double>(1.0, 0), pmt_to_complex(pmt_from_long(1)));
CPPUNIT_ASSERT_EQUAL(std::complex<double>(1.0, 0), pmt_to_complex(pmt_from_double(1.0)));
}
@@ -472,7 +484,7 @@ class qa_pmt_msg_accepter_nop : public gruel::msg_accepter {
public:
qa_pmt_msg_accepter_nop(){};
~qa_pmt_msg_accepter_nop();
- void post(pmt_t){};
+ void post(pmt_t,pmt_t){};
};
qa_pmt_msg_accepter_nop::~qa_pmt_msg_accepter_nop(){}
@@ -495,9 +507,10 @@ qa_pmt_prims::test_msg_accepter()
CPPUNIT_ASSERT_THROW(pmt_msg_accepter_ref(p0), pmt_wrong_type);
// just confirm interfaces on send are OK
- gruel::send(ma0.get(), sym);
- gruel::send(ma0, sym);
- gruel::send(p1, sym);
+ pmt_t port(pmt_intern("port"));
+ gruel::send(ma0.get(), port, sym);
+ gruel::send(ma0, port, sym);
+ gruel::send(p1, port, sym);
}