diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-11-05 18:05:23 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-11-05 18:05:23 +0900 |
| commit | 0c162dfbfb4a875fac9374c65cf93382ff9ce4ed (patch) | |
| tree | 6fbc9cc204305017438d9511db631b9b2e7fc538 /test/UTPexExtensionMessageTest.cc | |
| parent | 6ea1b68db186036e9f05c06915f8c4bd757c3a25 (diff) | |
Made util::fromHex and base32::decode function template
Diffstat (limited to 'test/UTPexExtensionMessageTest.cc')
| -rw-r--r-- | test/UTPexExtensionMessageTest.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/UTPexExtensionMessageTest.cc b/test/UTPexExtensionMessageTest.cc index eb0c3178..00913de8 100644 --- a/test/UTPexExtensionMessageTest.cc +++ b/test/UTPexExtensionMessageTest.cc @@ -4,6 +4,7 @@ #include <cppunit/extensions/HelperMacros.h> +#include "TestUtil.h" #include "Peer.h" #include "a2netcompat.h" #include "util.h" @@ -103,9 +104,9 @@ void UTPexExtensionMessageTest::testGetBencodedData() std::string expected = "d5:added12:"+ std::string(&c1[0], &c1[6])+std::string(&c2[0], &c2[6])+ - "7:added.f2:"+util::fromHex("0200")+ + "7:added.f2:"+fromHex("0200")+ "6:added618:"+std::string(&c5[0], &c5[COMPACT_LEN_IPV6])+ - "8:added6.f1:"+util::fromHex("00")+ + "8:added6.f1:"+fromHex("00")+ "7:dropped12:"+std::string(&c3[0], &c3[6])+std::string(&c4[0], &c4[6])+ "8:dropped618:"+std::string(&c6[0], &c6[COMPACT_LEN_IPV6])+ "e"; @@ -194,9 +195,9 @@ void UTPexExtensionMessageTest::testCreate() std::string data = std::string(&id[0], &id[1])+"d5:added12:"+ std::string(&c1[0], &c1[6])+std::string(&c2[0], &c2[6])+ - "7:added.f2:"+util::fromHex("0200")+ + "7:added.f2:"+fromHex("0200")+ "6:added618:"+std::string(&c5[0], &c5[COMPACT_LEN_IPV6])+ - "8:added6.f1:"+util::fromHex("00")+ + "8:added6.f1:"+fromHex("00")+ "7:dropped12:"+std::string(&c3[0], &c3[6])+std::string(&c4[0], &c4[6])+ "8:dropped618:"+std::string(&c6[0], &c6[COMPACT_LEN_IPV6])+ "e"; |
