diff options
Diffstat (limited to 'Swiften/QA/FileTransferTest/FileTransferTest.cpp')
-rw-r--r-- | Swiften/QA/FileTransferTest/FileTransferTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Swiften/QA/FileTransferTest/FileTransferTest.cpp b/Swiften/QA/FileTransferTest/FileTransferTest.cpp index 8faf8a9..2dcaeb8 100644 --- a/Swiften/QA/FileTransferTest/FileTransferTest.cpp +++ b/Swiften/QA/FileTransferTest/FileTransferTest.cpp | |||
@@ -83,11 +83,11 @@ class FileTransferTest { | |||
83 | for (size_t n = 0; n < sendData_.size(); n++) { | 83 | for (size_t n = 0; n < sendData_.size(); n++) { |
84 | sendData_[n] = boost::numeric_cast<unsigned char>(randGen.generateRandomInteger(255)); | 84 | sendData_[n] = boost::numeric_cast<unsigned char>(randGen.generateRandomInteger(255)); |
85 | } | 85 | } |
86 | 86 | ||
87 | std::ofstream outfile(sendFilePath_.native().c_str(), std::ios::out | std::ios::binary); | 87 | std::ofstream outfile(sendFilePath_.native().c_str(), std::ios::out | std::ios::binary); |
88 | outfile.write(reinterpret_cast<char *>(&sendData_[0]), sendData_.size()); | 88 | outfile.write(reinterpret_cast<char *>(&sendData_[0]), boost::numeric_cast<ptrdiff_t>(sendData_.size())); |
89 | outfile.close(); | 89 | outfile.close(); |
90 | } | 90 | } |
91 | 91 | ||
92 | ~FileTransferTest() { | 92 | ~FileTransferTest() { |
93 | timeOut_->stop(); | 93 | timeOut_->stop(); |
@@ -259,11 +259,11 @@ class FileTransferTest { | |||
259 | bool receiverIsDone_; | 259 | bool receiverIsDone_; |
260 | 260 | ||
261 | Timer::ref timeOut_; | 261 | Timer::ref timeOut_; |
262 | }; | 262 | }; |
263 | 263 | ||
264 | bool runTest(int senderCandidates, int receiverCandidates) { | 264 | static bool runTest(int senderCandidates, int receiverCandidates) { |
265 | bool success = false; | 265 | bool success = false; |
266 | 266 | ||
267 | std::cout << "senderCandidates: " << senderCandidates << ", receiverCandidates: " << receiverCandidates << std::endl; | 267 | std::cout << "senderCandidates: " << senderCandidates << ", receiverCandidates: " << receiverCandidates << std::endl; |
268 | bool expectSuccess = (senderCandidates & receiverCandidates) > 0; | 268 | bool expectSuccess = (senderCandidates & receiverCandidates) > 0; |
269 | 269 | ||