Skip to content

Commit

Permalink
Fixed typo: threw -> thrown
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuhiro-t committed Aug 9, 2007
1 parent 645e66e commit 729d566
Show file tree
Hide file tree
Showing 20 changed files with 71 additions and 71 deletions.
6 changes: 3 additions & 3 deletions test/BtAllowedFastMessageTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ 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
try {
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(...) {
}
}
Expand All @@ -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(...) {}
}

Expand Down
4 changes: 2 additions & 2 deletions test/BtBitfieldMessageTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ 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
try {
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(...) {
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/BtCancelMessageTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ 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
try {
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(...) {
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/BtChokeMessageTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ 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
try {
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(...) {
}
}
Expand Down
6 changes: 3 additions & 3 deletions test/BtHaveAllMessageTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ 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
try {
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(...) {
}
}
Expand All @@ -70,6 +70,6 @@ void BtHaveAllMessageTest::testDoReceivedAction() {

try {
msg.doReceivedAction();
CPPUNIT_FAIL("exception must be threw.");
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {}
}
4 changes: 2 additions & 2 deletions test/BtHaveMessageTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ 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
try {
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(...) {
}
}
Expand Down
6 changes: 3 additions & 3 deletions test/BtHaveNoneMessageTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ 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
try {
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(...) {
}
}
Expand All @@ -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(...) {}
}

Expand Down
4 changes: 2 additions & 2 deletions test/BtInterestedMessageTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ 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
try {
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(...) {
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/BtNotInterestedMessageTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ 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
try {
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(...) {
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/BtPieceMessageTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ 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
try {
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(...) {
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/BtPortMessageTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ 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
try {
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(...) {
}
}
Expand Down
6 changes: 3 additions & 3 deletions test/BtRejectMessageTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ 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
try {
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(...) {
}
}
Expand Down Expand Up @@ -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(...) {}

}
Expand Down
4 changes: 2 additions & 2 deletions test/BtRequestMessageTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,15 @@ 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
try {
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(...) {
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/BtSuggestPieceMessageTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ 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
try {
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(...) {
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/BtUnchokeMessageTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ 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
try {
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(...) {
}
}
Expand Down
6 changes: 3 additions & 3 deletions test/HttpHeaderProcessorTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions test/HttpResponseTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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.");
}
}

Expand Down Expand Up @@ -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.");
}
}

Expand All @@ -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;
}
Expand Down Expand Up @@ -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.");
}
}
Loading

0 comments on commit 729d566

Please sign in to comment.