summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-04-04 19:35:56 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2016-04-04 19:35:56 +0100
commitdf8d3d1cd4f5624d6783586ff5429edbdbcca018 (patch)
tree00ef9db488812dd6018b1186cf4bad8a4928d4da
parentDon't require ModelPartFor compat wrapper (diff)
downloadp2pvr-df8d3d1cd4f5624d6783586ff5429edbdbcca018.tar.bz2
p2pvr-df8d3d1cd4f5624d6783586ff5429edbdbcca018.tar.xz
p2pvr-df8d3d1cd4f5624d6783586ff5429edbdbcca018.zip
Use macros in BOOST_TEST_ instead of just BOOST_
-rw-r--r--p2pvr/daemon/unittests/testErrorHandling.cpp16
-rw-r--r--p2pvr/daemon/unittests/testMaint.cpp10
-rw-r--r--p2pvr/daemon/unittests/testRecording.cpp10
-rw-r--r--p2pvr/daemon/unittests/testRecordings.cpp2
-rw-r--r--p2pvr/dvb/unittests/createBroadcast.cpp18
-rw-r--r--p2pvr/dvb/unittests/createSamples.cpp10
6 files changed, 33 insertions, 33 deletions
diff --git a/p2pvr/daemon/unittests/testErrorHandling.cpp b/p2pvr/daemon/unittests/testErrorHandling.cpp
index b522557..c4ea88d 100644
--- a/p2pvr/daemon/unittests/testErrorHandling.cpp
+++ b/p2pvr/daemon/unittests/testErrorHandling.cpp
@@ -92,41 +92,41 @@ BOOST_FIXTURE_TEST_SUITE(ErrorHandling, Core)
BOOST_AUTO_TEST_CASE(TestRawDataClient)
{
- BOOST_CHECKPOINT("Setup");
+ BOOST_TEST_CHECKPOINT("Setup");
auto del = s->GetDeliveryForSi();
auto gd = d->GetTunerAny(del);
TemporaryIceAdapterObject<P2PVR::RawDataClient> a(adapter, new TestClient());
- BOOST_CHECKPOINT("Make successful call");
+ BOOST_TEST_CHECKPOINT("Make successful call");
gd->SendNetworkInformation(a);
}
BOOST_AUTO_TEST_CASE(TestParser)
{
- BOOST_CHECKPOINT("Setup");
+ BOOST_TEST_CHECKPOINT("Setup");
auto del = s->GetDeliveryForSi();
auto gd = d->GetTunerAny(del);
TemporaryIceAdapterObject<P2PVR::RawDataClient> a(adapter, new TestNetworkParser());
- BOOST_CHECKPOINT("Make successful call");
+ BOOST_TEST_CHECKPOINT("Make successful call");
gd->SendNetworkInformation(a);
}
BOOST_AUTO_TEST_CASE(TestRawDataClientWithError)
{
- BOOST_CHECKPOINT("Setup");
+ BOOST_TEST_CHECKPOINT("Setup");
auto del = s->GetDeliveryForSi();
auto gd = d->GetTunerAny(del);
TemporaryIceAdapterObject<P2PVR::RawDataClient> a(adapter, new FailingTestClient());
- BOOST_CHECKPOINT("Make failing call");
+ BOOST_TEST_CHECKPOINT("Make failing call");
BOOST_REQUIRE_THROW(gd->SendNetworkInformation(a), P2PVR::DataHandlingException);
}
BOOST_AUTO_TEST_CASE(TestParserWithError)
{
- BOOST_CHECKPOINT("Setup");
+ BOOST_TEST_CHECKPOINT("Setup");
auto del = s->GetDeliveryForSi();
auto gd = d->GetTunerAny(del);
TemporaryIceAdapterObject<P2PVR::RawDataClient> a(adapter, new FailingTestNetworkParser());
- BOOST_CHECKPOINT("Make failing call");
+ BOOST_TEST_CHECKPOINT("Make failing call");
BOOST_REQUIRE_THROW(gd->SendNetworkInformation(a), P2PVR::DataHandlingException);
}
diff --git a/p2pvr/daemon/unittests/testMaint.cpp b/p2pvr/daemon/unittests/testMaint.cpp
index ec04649..a86ff78 100644
--- a/p2pvr/daemon/unittests/testMaint.cpp
+++ b/p2pvr/daemon/unittests/testMaint.cpp
@@ -210,10 +210,10 @@ BOOST_AUTO_TEST_CASE( GetService )
BOOST_AUTO_TEST_CASE( update_events )
{
- BOOST_CHECKPOINT("Get a DB connection for faking stuff");
+ BOOST_TEST_CHECKPOINT("Get a DB connection for faking stuff");
auto db = this->dataSource<RdbmsDataSource>("postgres")->getReadonly(); // Naughty, but don't want txs
- BOOST_CHECKPOINT("Write first events");
+ BOOST_TEST_CHECKPOINT("Write first events");
MockTuner::SetEventsSet(0);
m->UpdateEvents();
auto dayOneEvents = s->EventSearch(IceUtil::Optional<std::string>(), IceUtil::Optional<int>(),
@@ -222,7 +222,7 @@ BOOST_AUTO_TEST_CASE( update_events )
BOOST_REQUIRE(s->GetEvent(14448, 27052));
BOOST_REQUIRE_THROW(s->GetEvent(15856, 3591), P2PVR::NotFound);
- BOOST_CHECKPOINT("Fake some recorded stuff");
+ BOOST_TEST_CHECKPOINT("Fake some recorded stuff");
auto keyEvent1 = s->GetEvent(25664, 55689);
auto keyEvent2 = s->GetEvent(24256, 1014);
db->execute("INSERT INTO schedules(repeats) VALUES(false)");
@@ -243,13 +243,13 @@ BOOST_AUTO_TEST_CASE( update_events )
BOOST_REQUIRE(keyEvent2->Current);
BOOST_REQUIRE_EQUAL(keyEvent2->StartTime, Common::DateTime({2014, 12, 17, 5, 30}));
- BOOST_CHECKPOINT("Write second events");
+ BOOST_TEST_CHECKPOINT("Write second events");
MockTuner::SetEventsSet(1);
m->UpdateEvents();
BOOST_REQUIRE_THROW(s->GetEvent(14448, 27052), P2PVR::NotFound);
BOOST_REQUIRE(s->GetEvent(15856, 3591));
- BOOST_CHECKPOINT("Check our faked stuff is still there and right");
+ BOOST_TEST_CHECKPOINT("Check our faked stuff is still there and right");
auto dayOneEventsOnDayTwo = s->EventSearch(IceUtil::Optional<std::string>(), IceUtil::Optional<int>(),
Common::DateTime {2014, 12, 18, 3, 0}, Common::DateTime {2014, 12, 19, 3, 0});
// Some datetime range overlap, but most are gone
diff --git a/p2pvr/daemon/unittests/testRecording.cpp b/p2pvr/daemon/unittests/testRecording.cpp
index 260bf82..2ce4080 100644
--- a/p2pvr/daemon/unittests/testRecording.cpp
+++ b/p2pvr/daemon/unittests/testRecording.cpp
@@ -83,21 +83,21 @@ BOOST_FIXTURE_TEST_SUITE( RecordingCore, Core );
BOOST_AUTO_TEST_CASE( streamServiceToTarget )
{
- BOOST_CHECKPOINT("Create mock target");
+ BOOST_TEST_CHECKPOINT("Create mock target");
IceUtil::Handle<MockTarget> target = new MockTarget();
TemporaryIceAdapterObject<P2PVR::RawDataClient> targetPrx(adapter, target);
- BOOST_CHECKPOINT("Create service streamer");
+ BOOST_TEST_CHECKPOINT("Create service streamer");
auto ss = ServiceStreamerPtr(new ServiceStreamer(4170, targetPrx, ic, adapter));
- BOOST_CHECKPOINT("Start");
+ BOOST_TEST_CHECKPOINT("Start");
ss->Start();
sleep(2);
- BOOST_CHECKPOINT("Stop");
+ BOOST_TEST_CHECKPOINT("Stop");
ss->Stop();
- BOOST_MESSAGE("Received bytes: " << target->bytesReceived);
+ BOOST_TEST_MESSAGE("Received bytes: " << target->bytesReceived);
BOOST_REQUIRE(target->bytesReceived > 150000);
}
diff --git a/p2pvr/daemon/unittests/testRecordings.cpp b/p2pvr/daemon/unittests/testRecordings.cpp
index 7415cb1..a0b88b5 100644
--- a/p2pvr/daemon/unittests/testRecordings.cpp
+++ b/p2pvr/daemon/unittests/testRecordings.cpp
@@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE( recordings_addAndDelete )
{
auto event = si->GetEvent(5696, 40124);
BOOST_REQUIRE(event);
- BOOST_MESSAGE(event->Title);
+ BOOST_TEST_MESSAGE(event->Title);
auto guid = boost::lexical_cast<std::string>(boost::uuids::random_generator()());
auto rec = P2PVR::RecordingPtr(new P2PVR::Recording(0, "", guid, 0, event->EventUid));
diff --git a/p2pvr/dvb/unittests/createBroadcast.cpp b/p2pvr/dvb/unittests/createBroadcast.cpp
index 1b13d37..c009fe2 100644
--- a/p2pvr/dvb/unittests/createBroadcast.cpp
+++ b/p2pvr/dvb/unittests/createBroadcast.cpp
@@ -88,7 +88,7 @@ class Sampler {
out->write(s);
Ice::ByteSeq buf;
out->finished(buf);
- BOOST_MESSAGE(root);
+ BOOST_TEST_MESSAGE(root);
auto outFile = fopen((root / fileName).string().c_str(), "w");
BOOST_REQUIRE(outFile);
BOOST_REQUIRE_EQUAL(1, fwrite(&buf.front(), buf.size(), 1, outFile));
@@ -107,27 +107,27 @@ BOOST_AUTO_TEST_CASE( broadcast_sample )
BOOST_REQUIRE_EQUAL(transport->Frequency, 682000000);
BOOST_REQUIRE_EQUAL(transport->TransmissionMode, 1);
- BOOST_CHECKPOINT("Acquire device");
+ BOOST_TEST_CHECKPOINT("Acquire device");
P2PVR::TunerPrx tuner = devs->GetTunerSpecific(transport);
BOOST_REQUIRE(tuner);
tuner->ice_ping();
- BOOST_CHECKPOINT("Create sampler");
+ BOOST_TEST_CHECKPOINT("Create sampler");
Sampler sampler(4170, devs, adapter);
- BOOST_CHECKPOINT("Start stream");
+ BOOST_TEST_CHECKPOINT("Start stream");
sampler.Start(transport);
sleep(10);
- BOOST_CHECKPOINT("Stop stream");
+ BOOST_TEST_CHECKPOINT("Stop stream");
sampler.Stop();
- BOOST_MESSAGE("PAT packets: " << sampler.pat.size());
- BOOST_MESSAGE("PMT packets: " << sampler.pmt.size());
- BOOST_MESSAGE("Vid packets: " << sampler.vid.size());
+ BOOST_TEST_MESSAGE("PAT packets: " << sampler.pat.size());
+ BOOST_TEST_MESSAGE("PMT packets: " << sampler.pmt.size());
+ BOOST_TEST_MESSAGE("Vid packets: " << sampler.vid.size());
- BOOST_CHECKPOINT("Save samples");
+ BOOST_TEST_CHECKPOINT("Save samples");
sampler.Save(ic);
}
diff --git a/p2pvr/dvb/unittests/createSamples.cpp b/p2pvr/dvb/unittests/createSamples.cpp
index b9f2aaa..94cfd50 100644
--- a/p2pvr/dvb/unittests/createSamples.cpp
+++ b/p2pvr/dvb/unittests/createSamples.cpp
@@ -85,25 +85,25 @@ CaptureAndSave(const boost::filesystem::path & fileName, const boost::function<v
BOOST_REQUIRE_EQUAL(transport->Frequency, 682000000);
BOOST_REQUIRE_EQUAL(transport->TransmissionMode, 1);
- BOOST_CHECKPOINT("Acquire device");
+ BOOST_TEST_CHECKPOINT("Acquire device");
P2PVR::TunerPrx tuner = devs->GetTunerAny(transport);
BOOST_REQUIRE(tuner);
tuner->ice_ping();
- BOOST_CHECKPOINT("Get data");
+ BOOST_TEST_CHECKPOINT("Get data");
method(tuner, parser);
- BOOST_CHECKPOINT("Release device");
+ BOOST_TEST_CHECKPOINT("Release device");
devs->ReleaseTuner(tuner);
- BOOST_MESSAGE("Total packets: " << p->packets.size());
+ BOOST_TEST_MESSAGE("Total packets: " << p->packets.size());
BOOST_REQUIRE(p->packets.size() > 0);
auto out = Ice::createOutputStream(ic);
out->write(p->packets);
Ice::ByteSeq buf;
out->finished(buf);
- BOOST_MESSAGE(root);
+ BOOST_TEST_MESSAGE(root);
auto outFile = fopen((root / fileName).string().c_str(), "w");
BOOST_REQUIRE(outFile);
BOOST_REQUIRE_EQUAL(1, fwrite(&buf.front(), buf.size(), 1, outFile));