diff options
| author | Vincent Richard <[email protected]> | 2013-03-24 12:30:26 +0100 |
|---|---|---|
| committer | Vincent Richard <[email protected]> | 2013-03-24 12:30:26 +0100 |
| commit | 21945be4c4ef822b7dc5f6ded80027bd5437ce9d (patch) | |
| tree | 4302bdee8d07b52be8aa13a4618104e9503e4b10 /tests | |
| parent | OpenSSL library already mentioned in Required.private, don't need to be speci... (diff) | |
| download | vmime-21945be4c4ef822b7dc5f6ded80027bd5437ce9d.tar.gz vmime-21945be4c4ef822b7dc5f6ded80027bd5437ce9d.zip | |
Fixed warnings and 64-bit issues.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/parser/charsetFilteredOutputStreamTest.cpp | 12 | ||||
| -rw-r--r-- | tests/parser/charsetTest.cpp | 8 | ||||
| -rw-r--r-- | tests/testUtils.cpp | 8 |
3 files changed, 14 insertions, 14 deletions
diff --git a/tests/parser/charsetFilteredOutputStreamTest.cpp b/tests/parser/charsetFilteredOutputStreamTest.cpp index fdfed2c6..08eeb63c 100644 --- a/tests/parser/charsetFilteredOutputStreamTest.cpp +++ b/tests/parser/charsetFilteredOutputStreamTest.cpp @@ -101,10 +101,10 @@ VMIME_TEST_SUITE_BEGIN(charsetFilteredOutputStreamTest) std::ostringstream testName; testName << i << ": " << entry.fromCharset << " -> " << entry.toCharset; - const unsigned int inLength = (entry.fromLength == 0 ? strlen(entry.fromBytes) : entry.fromLength); + const unsigned long inLength = (entry.fromLength == 0 ? strlen(entry.fromBytes) : entry.fromLength); vmime::string in(entry.fromBytes, entry.fromBytes + inLength); - const unsigned int outLength = (entry.toLength == 0 ? strlen(entry.toBytes) : entry.toLength); + const unsigned long outLength = (entry.toLength == 0 ? strlen(entry.toBytes) : entry.toLength); vmime::string expectedOut(entry.toBytes, entry.toBytes + outLength); vmime::string actualOut; @@ -136,10 +136,10 @@ VMIME_TEST_SUITE_BEGIN(charsetFilteredOutputStreamTest) std::ostringstream testName; testName << i << ": " << entry.fromCharset << " -> " << entry.toCharset; - const unsigned int inLength = (entry.fromLength == 0 ? strlen(entry.fromBytes) : entry.fromLength); + const unsigned long inLength = (entry.fromLength == 0 ? strlen(entry.fromBytes) : entry.fromLength); vmime::string in(entry.fromBytes, entry.fromBytes + inLength); - const unsigned int outLength = (entry.toLength == 0 ? strlen(entry.toBytes) : entry.toLength); + const unsigned long outLength = (entry.toLength == 0 ? strlen(entry.toBytes) : entry.toLength); vmime::string expectedOut(entry.toBytes, entry.toBytes + outLength); vmime::string actualOut; @@ -174,10 +174,10 @@ VMIME_TEST_SUITE_BEGIN(charsetFilteredOutputStreamTest) std::ostringstream testName; testName << i << ": " << entry.fromCharset << " -> " << entry.toCharset; - const unsigned int inLength = (entry.fromLength == 0 ? strlen(entry.fromBytes) : entry.fromLength); + const unsigned long inLength = (entry.fromLength == 0 ? strlen(entry.fromBytes) : entry.fromLength); vmime::string in(entry.fromBytes, entry.fromBytes + inLength); - const unsigned int outLength = (entry.toLength == 0 ? strlen(entry.toBytes) : entry.toLength); + const unsigned long outLength = (entry.toLength == 0 ? strlen(entry.toBytes) : entry.toLength); vmime::string expectedOut(entry.toBytes, entry.toBytes + outLength); vmime::string actualOut; diff --git a/tests/parser/charsetTest.cpp b/tests/parser/charsetTest.cpp index 8725c530..2aab7550 100644 --- a/tests/parser/charsetTest.cpp +++ b/tests/parser/charsetTest.cpp @@ -51,10 +51,10 @@ VMIME_TEST_SUITE_BEGIN(charsetTest) std::ostringstream testName; testName << i << ": " << entry.fromCharset << " -> " << entry.toCharset; - const unsigned int inLength = (entry.fromLength == 0 ? strlen(entry.fromBytes) : entry.fromLength); + const unsigned long inLength = (entry.fromLength == 0 ? strlen(entry.fromBytes) : entry.fromLength); vmime::string in(entry.fromBytes, entry.fromBytes + inLength); - const unsigned int outLength = (entry.toLength == 0 ? strlen(entry.toBytes) : entry.toLength); + const unsigned long outLength = (entry.toLength == 0 ? strlen(entry.toBytes) : entry.toLength); vmime::string expectedOut(entry.toBytes, entry.toBytes + outLength); vmime::string actualOut; @@ -75,10 +75,10 @@ VMIME_TEST_SUITE_BEGIN(charsetTest) std::ostringstream testName; testName << i << ": " << entry.fromCharset << " -> " << entry.toCharset; - const unsigned int inLength = (entry.fromLength == 0 ? strlen(entry.fromBytes) : entry.fromLength); + const unsigned long inLength = (entry.fromLength == 0 ? strlen(entry.fromBytes) : entry.fromLength); vmime::string in(entry.fromBytes, entry.fromBytes + inLength); - const unsigned int outLength = (entry.toLength == 0 ? strlen(entry.toBytes) : entry.toLength); + const unsigned long outLength = (entry.toLength == 0 ? strlen(entry.toBytes) : entry.toLength); vmime::string expectedOut(entry.toBytes, entry.toBytes + outLength); vmime::string actualOut; diff --git a/tests/testUtils.cpp b/tests/testUtils.cpp index d008ed94..cb6df133 100644 --- a/tests/testUtils.cpp +++ b/tests/testUtils.cpp @@ -276,15 +276,15 @@ const vmime::string toHex(const vmime::string str) vmime::string res = "\n"; - for (unsigned int i = 0 ; i < str.length() ; i += 16) + for (size_t i = 0 ; i < str.length() ; i += 16) { - unsigned int r = std::min + size_t r = std::min (static_cast <size_t>(16), str.length() - i); vmime::string hex; vmime::string chr; - for (unsigned int j = 0 ; j < r ; ++j) + for (size_t j = 0 ; j < r ; ++j) { const unsigned char c = str[i + j]; @@ -298,7 +298,7 @@ const vmime::string toHex(const vmime::string str) chr += '.'; } - for (unsigned int j = r ; j < 16 ; ++j) + for (size_t j = r ; j < 16 ; ++j) hex += " "; res += hex + " " + chr + "\n"; |
