[asterisk-scf-commits] asterisk-scf/release/media_operations_core.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Thu Feb 9 10:32:25 CST 2012
branch "master" has been updated
via 27e97f6760f2b8a788efffcaa02459c16b87f0c6 (commit)
from e5008e1679a0dde9a77b3b49fbfeee91d43fb90b (commit)
Summary of changes:
test/TestMediaOperations.cpp | 92 ++++++++++++++++++------------------------
1 files changed, 39 insertions(+), 53 deletions(-)
- Log -----------------------------------------------------------------
commit 27e97f6760f2b8a788efffcaa02459c16b87f0c6
Author: David M. Lee <dlee at digium.com>
Date: Thu Feb 9 10:32:12 2012 -0600
Pass exceptions on up to the test framework.
Fixes set-but-not-used errors.
diff --git a/test/TestMediaOperations.cpp b/test/TestMediaOperations.cpp
index bf4358d..617d5f3 100644
--- a/test/TestMediaOperations.cpp
+++ b/test/TestMediaOperations.cpp
@@ -279,69 +279,55 @@ struct GlobalIceFixture
::boost::debug::detect_memory_leaks(false);
::boost::unit_test::unit_test_log.set_stream( std::cout );
- int status = 0;
- try
- {
- //Since our translator makes calls to pjlib, we have to
- //register our threads with pjlib
- Ice::InitializationData id;
- id.threadHook = new pjlibHook();
- id.properties = IceBoxTestEnv.communicator->getProperties();
- Testbed.communicator = Ice::initialize(id);
-
- Testbed.adapter =
- Testbed.communicator->createObjectAdapterWithEndpoints("Adapter", "default");
- Testbed.adapter->activate();
- Testbed.locator = ServiceLocatorPrx::checkedCast(Testbed.communicator->propertyToProxy("LocatorService.Proxy"));
-
- if (!Testbed.locator) {
- throw "Invalid service locator proxy";
- }
+ //Since our translator makes calls to pjlib, we have to
+ //register our threads with pjlib
+ Ice::InitializationData id;
+ id.threadHook = new pjlibHook();
+ id.properties = IceBoxTestEnv.communicator->getProperties();
+ Testbed.communicator = Ice::initialize(id);
+
+ Testbed.adapter =
+ Testbed.communicator->createObjectAdapterWithEndpoints("Adapter", "default");
+ Testbed.adapter->activate();
+ Testbed.locator = ServiceLocatorPrx::checkedCast(Testbed.communicator->propertyToProxy("LocatorService.Proxy"));
+
+ if (!Testbed.locator) {
+ throw "Invalid service locator proxy";
+ }
- Testbed.ulaw = new G711uLAW();
- Testbed.ulaw->name = G711uLAWName;
+ Testbed.ulaw = new G711uLAW();
+ Testbed.ulaw->name = G711uLAWName;
- Testbed.alaw = new G711aLAW();
- Testbed.alaw->name = G711aLAWName;
+ Testbed.alaw = new G711aLAW();
+ Testbed.alaw->name = G711aLAWName;
- Testbed.slin8 = new SignedLinear();
- Testbed.slin8->name = SignedLinear8Name;
- Testbed.slin8->sampleRate = 8000;
+ Testbed.slin8 = new SignedLinear();
+ Testbed.slin8->name = SignedLinear8Name;
+ Testbed.slin8->sampleRate = 8000;
- Testbed.slin16 = new SignedLinear();
- Testbed.slin16->name = SignedLinear16Name;
- Testbed.slin16->sampleRate = 16000;
+ Testbed.slin16 = new SignedLinear();
+ Testbed.slin16->name = SignedLinear16Name;
+ Testbed.slin16->sampleRate = 16000;
- Testbed.g722 = new G722();
- Testbed.g722->name = G722Name;
+ Testbed.g722 = new G722();
+ Testbed.g722->name = G722Name;
- Testbed.sampleAlawFrame = new Frame(Testbed.alaw, new ByteSeqPayload(Ice::ByteSeq(sampleAlaw, sampleAlaw + sizeof(sampleAlaw))));
- Testbed.sampleAlawFrameSize = sizeof(sampleAlaw);
+ Testbed.sampleAlawFrame = new Frame(Testbed.alaw, new ByteSeqPayload(Ice::ByteSeq(sampleAlaw, sampleAlaw + sizeof(sampleAlaw))));
+ Testbed.sampleAlawFrameSize = sizeof(sampleAlaw);
- Testbed.sampleUlawFrame = new Frame(Testbed.ulaw, new ByteSeqPayload(Ice::ByteSeq(sampleUlaw, sampleUlaw + sizeof(sampleUlaw))));
- Testbed.sampleUlawFrameSize = sizeof(sampleUlaw);
+ Testbed.sampleUlawFrame = new Frame(Testbed.ulaw, new ByteSeqPayload(Ice::ByteSeq(sampleUlaw, sampleUlaw + sizeof(sampleUlaw))));
+ Testbed.sampleUlawFrameSize = sizeof(sampleUlaw);
- ShortSeqPayloadPtr slin8Payload(new ShortSeqPayload(Ice::ShortSeq(sampleSlin8, sampleSlin8 + (sizeof(sampleSlin8) / 2))));
- Testbed.sampleSlin8Frame = new Frame(Testbed.slin8, slin8Payload);
- Testbed.sampleSlin8FrameSize = slin8Payload->payload.size();
+ ShortSeqPayloadPtr slin8Payload(new ShortSeqPayload(Ice::ShortSeq(sampleSlin8, sampleSlin8 + (sizeof(sampleSlin8) / 2))));
+ Testbed.sampleSlin8Frame = new Frame(Testbed.slin8, slin8Payload);
+ Testbed.sampleSlin8FrameSize = slin8Payload->payload.size();
- ShortSeqPayloadPtr slin16Payload(new ShortSeqPayload(Ice::ShortSeq(sampleSlin16, sampleSlin16 + (sizeof(sampleSlin16) / 2))));
- Testbed.sampleSlin16Frame = new Frame(Testbed.slin16, slin16Payload);
- Testbed.sampleSlin16FrameSize = slin16Payload->payload.size();
+ ShortSeqPayloadPtr slin16Payload(new ShortSeqPayload(Ice::ShortSeq(sampleSlin16, sampleSlin16 + (sizeof(sampleSlin16) / 2))));
+ Testbed.sampleSlin16Frame = new Frame(Testbed.slin16, slin16Payload);
+ Testbed.sampleSlin16FrameSize = slin16Payload->payload.size();
- Testbed.sampleG722Frame = new Frame(Testbed.g722, new ByteSeqPayload(Ice::ByteSeq(sampleG722, sampleG722 + sizeof(sampleG722))));
- Testbed.sampleG722FrameSize = sizeof(sampleG722);
- }
- catch (const Ice::Exception& ex)
- {
- std::cerr << ex << std::endl;
- status = 1;
- }
- catch (...)
- {
- std::cerr << "Some non-Ice exception got encaughtened." << std::endl;
- status = 1;
- }
+ Testbed.sampleG722Frame = new Frame(Testbed.g722, new ByteSeqPayload(Ice::ByteSeq(sampleG722, sampleG722 + sizeof(sampleG722))));
+ Testbed.sampleG722FrameSize = sizeof(sampleG722);
}
~GlobalIceFixture()
-----------------------------------------------------------------------
--
asterisk-scf/release/media_operations_core.git
More information about the asterisk-scf-commits
mailing list