Fixed typo: threw -> thrown

pull/1/head
Tatsuhiro Tsujikawa 2007-08-09 14:54:36 +00:00
parent 645e66ea11
commit 729d566678
20 changed files with 71 additions and 71 deletions

View File

@ -43,7 +43,7 @@ void BtAllowedFastMessageTest::testCreate() {
unsigned char msg[10];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 6, 17);
BtAllowedFastMessage::create(&msg[4], 6);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
// case: id is wrong
@ -51,7 +51,7 @@ void BtAllowedFastMessageTest::testCreate() {
unsigned char msg[9];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 5, 18);
BtAllowedFastMessage::create(&msg[4], 5);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
}
@ -78,7 +78,7 @@ void BtAllowedFastMessageTest::testDoReceivedAction() {
peer->setFastExtensionEnabled(false);
try {
msg.doReceivedAction();
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {}
}

View File

@ -43,7 +43,7 @@ void BtBitfieldMessageTest::testCreate() {
unsigned char msg[5];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 1, 5);
BtBitfieldMessage::create(&msg[4], 1);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
// case: id is wrong
@ -51,7 +51,7 @@ void BtBitfieldMessageTest::testCreate() {
unsigned char msg[5+2];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 3, 6);
BtBitfieldMessage::create(&msg[4], 3);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
}

View File

@ -75,7 +75,7 @@ void BtCancelMessageTest::testCreate() {
unsigned char msg[18];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 14, 8);
BtCancelMessage::create(&msg[4], 14);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
// case: id is wrong
@ -83,7 +83,7 @@ void BtCancelMessageTest::testCreate() {
unsigned char msg[17];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 13, 9);
BtCancelMessage::create(&msg[4], 13);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
}

View File

@ -86,7 +86,7 @@ void BtChokeMessageTest::testCreate() {
unsigned char msg[6];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 2, 0);
BtChokeMessage::create(&msg[4], 2);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
// case: id is wrong
@ -94,7 +94,7 @@ void BtChokeMessageTest::testCreate() {
unsigned char msg[5];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 1, 1);
BtChokeMessage::create(&msg[4], 1);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
}

View File

@ -36,7 +36,7 @@ void BtHaveAllMessageTest::testCreate() {
unsigned char msg[6];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 2, 14);
BtHaveAllMessage::create(&msg[4], 2);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
// case: id is wrong
@ -44,7 +44,7 @@ void BtHaveAllMessageTest::testCreate() {
unsigned char msg[5];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 1, 15);
BtHaveAllMessage::create(&msg[4], 1);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
}
@ -70,6 +70,6 @@ void BtHaveAllMessageTest::testDoReceivedAction() {
try {
msg.doReceivedAction();
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {}
}

View File

@ -40,7 +40,7 @@ void BtHaveMessageTest::testCreate() {
unsigned char msg[10];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 6, 4);
BtHaveMessage::create(&msg[4], 2);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
// case: id is wrong
@ -48,7 +48,7 @@ void BtHaveMessageTest::testCreate() {
unsigned char msg[9];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 5, 5);
BtHaveMessage::create(&msg[4], 1);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
}

View File

@ -38,7 +38,7 @@ void BtHaveNoneMessageTest::testCreate() {
unsigned char msg[6];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 2, 15);
BtHaveNoneMessage::create(&msg[4], 2);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
// case: id is wrong
@ -46,7 +46,7 @@ void BtHaveNoneMessageTest::testCreate() {
unsigned char msg[5];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 1, 16);
BtHaveNoneMessage::create(&msg[4], 1);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
}
@ -68,7 +68,7 @@ void BtHaveNoneMessageTest::testDoReceivedAction() {
peer->setFastExtensionEnabled(false);
try {
msg.doReceivedAction();
CPPUNIT_FAIL("an exception must be threw.");
CPPUNIT_FAIL("an exception must be thrown.");
} catch(...) {}
}

View File

@ -40,7 +40,7 @@ void BtInterestedMessageTest::testCreate() {
unsigned char msg[6];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 2, 2);
BtInterestedMessage::create(&msg[4], 2);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
// case: id is wrong
@ -48,7 +48,7 @@ void BtInterestedMessageTest::testCreate() {
unsigned char msg[5];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 1, 3);
BtInterestedMessage::create(&msg[4], 1);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
}

View File

@ -40,7 +40,7 @@ void BtNotInterestedMessageTest::testCreate() {
unsigned char msg[6];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 2, 3);
BtNotInterestedMessage::create(&msg[4], 2);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
// case: id is wrong
@ -48,7 +48,7 @@ void BtNotInterestedMessageTest::testCreate() {
unsigned char msg[5];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 1, 4);
BtNotInterestedMessage::create(&msg[4], 1);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
}

View File

@ -122,7 +122,7 @@ void BtPieceMessageTest::testCreate() {
unsigned char msg[13];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 9, 7);
BtPieceMessage::create(&msg[4], 9);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
// case: id is wrong
@ -130,7 +130,7 @@ void BtPieceMessageTest::testCreate() {
unsigned char msg[13+2];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 11, 8);
BtPieceMessage::create(&msg[4], 11);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
}

View File

@ -37,7 +37,7 @@ void BtPortMessageTest::testCreate() {
unsigned char msg[8];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 4, 9);
BtPortMessage::create(&msg[4], 4);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
// case: id is wrong
@ -45,7 +45,7 @@ void BtPortMessageTest::testCreate() {
unsigned char msg[7];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 3, 10);
BtPortMessage::create(&msg[4], 3);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
}

View File

@ -107,7 +107,7 @@ void BtRejectMessageTest::testCreate() {
unsigned char msg[18];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 14, 16);
BtRejectMessage::create(&msg[4], 14);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
// case: id is wrong
@ -115,7 +115,7 @@ void BtRejectMessageTest::testCreate() {
unsigned char msg[17];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 13, 17);
BtRejectMessage::create(&msg[4], 13);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
}
@ -165,7 +165,7 @@ void BtRejectMessageTest::testDoReceivedActionFastExtensionDisabled() {
CPPUNIT_ASSERT(!RequestSlot::isNull(dispatcher->getOutstandingRequest(1, 16, 32)));
try {
msg->doReceivedAction();
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {}
}

View File

@ -141,7 +141,7 @@ void BtRequestMessageTest::testCreate() {
unsigned char msg[18];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 14, 6);
BtRequestMessage::create(&msg[4], 14);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
// case: id is wrong
@ -149,7 +149,7 @@ void BtRequestMessageTest::testCreate() {
unsigned char msg[17];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 13, 7);
BtRequestMessage::create(&msg[4], 13);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
}

View File

@ -38,7 +38,7 @@ void BtSuggestPieceMessageTest::testCreate() {
unsigned char msg[10];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 6, 13);
BtSuggestPieceMessage::create(&msg[4], 2);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
// case: id is wrong
@ -46,7 +46,7 @@ void BtSuggestPieceMessageTest::testCreate() {
unsigned char msg[9];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 5, 14);
BtSuggestPieceMessage::create(&msg[4], 1);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
}

View File

@ -39,7 +39,7 @@ void BtUnchokeMessageTest::testCreate() {
unsigned char msg[6];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 2, 1);
BtUnchokeMessage::create(&msg[4], 2);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
// case: id is wrong
@ -47,7 +47,7 @@ void BtUnchokeMessageTest::testCreate() {
unsigned char msg[5];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 1, 2);
BtUnchokeMessage::create(&msg[4], 1);
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {
}
}

View File

@ -115,7 +115,7 @@ void HttpHeaderProcessorTest::testGetHttpStatusHeader_empty()
try {
pair<string, HttpHeaderHandle> statusHeader = proc.getHttpStatusHeader();
CPPUNIT_FAIL("Exception must be threw.");
CPPUNIT_FAIL("Exception must be thrown.");
} catch(DlRetryEx* ex) {
cout << ex->getMsg() << endl;
delete ex;
@ -142,7 +142,7 @@ void HttpHeaderProcessorTest::testGetHttpStatusHeader_insufficientStatusLength()
proc.update(hd);
try {
pair<string, HttpHeaderHandle> statusHeader = proc.getHttpStatusHeader();
CPPUNIT_FAIL("Exception must be threw.");
CPPUNIT_FAIL("Exception must be thrown.");
} catch(DlRetryEx* ex) {
cout << ex->getMsg() << endl;
delete ex;
@ -162,7 +162,7 @@ void HttpHeaderProcessorTest::testBeyondLimit()
try {
proc.update(hd2);
CPPUNIT_FAIL("Exception must be threw.");
CPPUNIT_FAIL("Exception must be thrown.");
} catch(DlAbortEx* ex) {
cout << ex->getMsg() << endl;
delete ex;

View File

@ -226,7 +226,7 @@ void HttpResponseTest::testValidateResponse()
try {
httpResponse.validateResponse();
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
delete e;
}
@ -235,7 +235,7 @@ void HttpResponseTest::testValidateResponse()
try {
httpResponse.validateResponse();
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
delete e;
}
@ -245,7 +245,7 @@ void HttpResponseTest::testValidateResponse()
httpResponse.setHttpHeader(httpHeader);
try {
httpResponse.validateResponse();
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
delete e;
}
@ -256,7 +256,7 @@ void HttpResponseTest::testValidateResponse()
httpResponse.validateResponse();
} catch(Exception* e) {
delete e;
CPPUNIT_FAIL("exception must not be threw.");
CPPUNIT_FAIL("exception must not be thrown.");
}
}
@ -286,7 +286,7 @@ void HttpResponseTest::testValidateResponse_good_range()
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
CPPUNIT_FAIL("exception must not be threw.");
CPPUNIT_FAIL("exception must not be thrown.");
}
}
@ -313,7 +313,7 @@ void HttpResponseTest::testValidateResponse_bad_range()
try {
httpResponse.validateResponse();
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
delete e;
}
@ -346,6 +346,6 @@ void HttpResponseTest::testValidateResponse_chunked()
httpResponse.validateResponse();
} catch(Exception* e) {
delete e;
CPPUNIT_FAIL("exception must not be threw.");
CPPUNIT_FAIL("exception must not be thrown.");
}
}

View File

@ -37,41 +37,41 @@ void MetaFileUtilTest::testBdecoding() {
try {
char* str = "5:abcd";
MetaEntry* entry = MetaFileUtil::bdecoding(str, strlen(str));
CPPUNIT_FAIL("DlAbortEx exception must be threw.");
CPPUNIT_FAIL("DlAbortEx exception must be thrown.");
} catch(DlAbortEx* ex) {
delete ex;
} catch(...) {
CPPUNIT_FAIL("DlAbortEx exception must be threw.");
CPPUNIT_FAIL("DlAbortEx exception must be thrown.");
}
try {
char* str = "i1234";
MetaEntry* entry = MetaFileUtil::bdecoding(str, strlen(str));
CPPUNIT_FAIL("DlAbortEx exception must be threw.");
CPPUNIT_FAIL("DlAbortEx exception must be thrown.");
} catch(DlAbortEx* ex) {
delete ex;
} catch(...) {
CPPUNIT_FAIL("DlAbortEx exception must be threw.");
CPPUNIT_FAIL("DlAbortEx exception must be thrown.");
}
try {
char* str = "5abcd";
MetaEntry* entry = MetaFileUtil::bdecoding(str, strlen(str));
CPPUNIT_FAIL("DlAbortEx exception must be threw.");
CPPUNIT_FAIL("DlAbortEx exception must be thrown.");
} catch(DlAbortEx* ex) {
delete ex;
} catch(...) {
CPPUNIT_FAIL("DlAbortEx exception must be threw.");
CPPUNIT_FAIL("DlAbortEx exception must be thrown.");
}
try {
char* str = "d";
MetaEntry* entry = MetaFileUtil::bdecoding(str, strlen(str));
CPPUNIT_FAIL("DlAbortEx exception must be threw.");
CPPUNIT_FAIL("DlAbortEx exception must be thrown.");
} catch(DlAbortEx* ex) {
delete ex;
} catch(...) {
CPPUNIT_FAIL("DlAbortEx exception must be threw.");
CPPUNIT_FAIL("DlAbortEx exception must be thrown.");
}
}

View File

@ -81,7 +81,7 @@ void NetrcTest::testParse_fileNotFound()
Netrc netrc;
try {
netrc.parse("");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
@ -101,7 +101,7 @@ void NetrcTest::testParse_malformedNetrc()
Netrc netrc;
try {
netrc.parse("malformed.netrc");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;

View File

@ -67,7 +67,7 @@ void OptionHandlerTest::testBooleanOptionHandler()
CPPUNIT_ASSERT_EQUAL(string(V_FALSE), option.get("foo"));
try {
handler.parseArg(&option, "hello");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
@ -92,7 +92,7 @@ void OptionHandlerTest::testNumberOptionHandler_min()
CPPUNIT_ASSERT_EQUAL(string("1"), option.get("foo"));
try {
handler.parseArg(&option, "0");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
@ -108,7 +108,7 @@ void OptionHandlerTest::testNumberOptionHandler_max()
CPPUNIT_ASSERT_EQUAL(string("100"), option.get("foo"));
try {
handler.parseArg(&option, "101");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
@ -125,14 +125,14 @@ void OptionHandlerTest::testNumberOptionHandler_min_max()
CPPUNIT_ASSERT_EQUAL(string("100"), option.get("foo"));
try {
handler.parseArg(&option, "0");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
}
try {
handler.parseArg(&option, "101");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
@ -169,7 +169,7 @@ void OptionHandlerTest::testParameterOptionHandler_1argInit()
CPPUNIT_ASSERT_EQUAL(string("value1"), option.get("foo"));
try {
handler.parseArg(&option, "value3");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
@ -188,7 +188,7 @@ void OptionHandlerTest::testParameterOptionHandler_2argsInit()
CPPUNIT_ASSERT_EQUAL(string("value2"), option.get("foo"));
try {
handler.parseArg(&option, "value3");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
@ -211,7 +211,7 @@ void OptionHandlerTest::testParameterOptionHandler_listInit()
CPPUNIT_ASSERT_EQUAL(string("value2"), option.get("foo"));
try {
handler.parseArg(&option, "value3");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
@ -248,7 +248,7 @@ void OptionHandlerTest::testFloatNumberOptionHandler_min()
CPPUNIT_ASSERT_EQUAL(string("0.0"), option.get("foo"));
try {
handler.parseArg(&option, "-0.1");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
@ -263,7 +263,7 @@ void OptionHandlerTest::testFloatNumberOptionHandler_max()
CPPUNIT_ASSERT_EQUAL(string("10.0"), option.get("foo"));
try {
handler.parseArg(&option, "10.1");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
@ -280,14 +280,14 @@ void OptionHandlerTest::testFloatNumberOptionHandler_min_max()
CPPUNIT_ASSERT_EQUAL(string("10.0"), option.get("foo"));
try {
handler.parseArg(&option, "-0.1");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
}
try {
handler.parseArg(&option, "10.1");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
@ -324,35 +324,35 @@ void OptionHandlerTest::testHttpProxyOptionHandler()
try {
handler.parseArg(&option, "bar");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
}
try {
handler.parseArg(&option, "bar:");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
}
try {
handler.parseArg(&option, ":");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
}
try {
handler.parseArg(&option, ":80");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;
}
try {
handler.parseArg(&option, "foo:bar");
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(Exception* e) {
cerr << e->getMsg() << endl;
delete e;