summaryrefslogtreecommitdiff
path: root/test/basicserver/TestCommands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/basicserver/TestCommands.cpp')
-rw-r--r--test/basicserver/TestCommands.cpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/test/basicserver/TestCommands.cpp b/test/basicserver/TestCommands.cpp
index e193458e..5238819f 100644
--- a/test/basicserver/TestCommands.cpp
+++ b/test/basicserver/TestCommands.cpp
@@ -5,40 +5,12 @@
#include <syslog.h>
#endif
-<<<<<<< HEAD
-#include "autogen_TestProtocolServer.h"
-=======
#include "autogen_TestProtocol.h"
->>>>>>> 0.12
#include "CollectInBufferStream.h"
#include "MemLeakFindOn.h"
-<<<<<<< HEAD
-std::auto_ptr<ProtocolObject> TestProtocolServerHello::DoCommand(TestProtocolServer &rProtocol, TestContext &rContext)
-{
- if(mNumber32 != 41 || mNumber16 != 87 || mNumber8 != 11 || mText != "pingu")
- {
- return std::auto_ptr<ProtocolObject>(new TestProtocolServerError(0, 0));
- }
- return std::auto_ptr<ProtocolObject>(new TestProtocolServerHello(12,89,22,std::string("Hello world!")));
-}
-
-std::auto_ptr<ProtocolObject> TestProtocolServerLists::DoCommand(TestProtocolServer &rProtocol, TestContext &rContext)
-{
- return std::auto_ptr<ProtocolObject>(new TestProtocolServerListsReply(mLotsOfText.size()));
-}
-
-std::auto_ptr<ProtocolObject> TestProtocolServerQuit::DoCommand(TestProtocolServer &rProtocol, TestContext &rContext)
-{
- return std::auto_ptr<ProtocolObject>(new TestProtocolServerQuit);
-}
-
-std::auto_ptr<ProtocolObject> TestProtocolServerSimple::DoCommand(TestProtocolServer &rProtocol, TestContext &rContext)
-{
- return std::auto_ptr<ProtocolObject>(new TestProtocolServerSimpleReply(mValue+1));
-=======
std::auto_ptr<TestProtocolMessage> TestProtocolHello::DoCommand(TestProtocolReplyable &rProtocol, TestContext &rContext) const
{
if(mNumber32 != 41 || mNumber16 != 87 || mNumber8 != 11 || mText != "pingu")
@@ -61,7 +33,6 @@ std::auto_ptr<TestProtocolMessage> TestProtocolQuit::DoCommand(TestProtocolReply
std::auto_ptr<TestProtocolMessage> TestProtocolSimple::DoCommand(TestProtocolReplyable &rProtocol, TestContext &rContext) const
{
return std::auto_ptr<TestProtocolMessage>(new TestProtocolSimpleReply(mValue+1));
->>>>>>> 0.12
}
class UncertainBufferStream : public CollectInBufferStream
@@ -74,11 +45,7 @@ public:
}
};
-<<<<<<< HEAD
-std::auto_ptr<ProtocolObject> TestProtocolServerGetStream::DoCommand(TestProtocolServer &rProtocol, TestContext &rContext)
-=======
std::auto_ptr<TestProtocolMessage> TestProtocolGetStream::DoCommand(TestProtocolReplyable &rProtocol, TestContext &rContext) const
->>>>>>> 0.12
{
// make a new stream object
CollectInBufferStream *pstream = mUncertainSize?(new UncertainBufferStream):(new CollectInBufferStream);
@@ -101,16 +68,6 @@ std::auto_ptr<TestProtocolMessage> TestProtocolGetStream::DoCommand(TestProtocol
// Get it to be sent
rProtocol.SendStreamAfterCommand(pstream);
-<<<<<<< HEAD
- return std::auto_ptr<ProtocolObject>(new TestProtocolServerGetStream(mStartingValue, mUncertainSize));
-}
-
-std::auto_ptr<ProtocolObject> TestProtocolServerSendStream::DoCommand(TestProtocolServer &rProtocol, TestContext &rContext)
-{
- if(mValue != 0x73654353298ffLL)
- {
- return std::auto_ptr<ProtocolObject>(new TestProtocolServerError(0, 0));
-=======
return std::auto_ptr<TestProtocolMessage>(new TestProtocolGetStream(mStartingValue, mUncertainSize));
}
@@ -119,7 +76,6 @@ std::auto_ptr<TestProtocolMessage> TestProtocolSendStream::DoCommand(TestProtoco
if(mValue != 0x73654353298ffLL)
{
return std::auto_ptr<TestProtocolMessage>(new TestProtocolError(0, 0));
->>>>>>> 0.12
}
// Get a stream
@@ -135,20 +91,11 @@ std::auto_ptr<TestProtocolMessage> TestProtocolSendStream::DoCommand(TestProtoco
}
// tell the caller how many bytes there were
-<<<<<<< HEAD
- return std::auto_ptr<ProtocolObject>(new TestProtocolServerGetStream(bytes, uncertain));
-}
-
-std::auto_ptr<ProtocolObject> TestProtocolServerString::DoCommand(TestProtocolServer &rProtocol, TestContext &rContext)
-{
- return std::auto_ptr<ProtocolObject>(new TestProtocolServerString(mTest));
-=======
return std::auto_ptr<TestProtocolMessage>(new TestProtocolGetStream(bytes, uncertain));
}
std::auto_ptr<TestProtocolMessage> TestProtocolString::DoCommand(TestProtocolReplyable &rProtocol, TestContext &rContext) const
{
return std::auto_ptr<TestProtocolMessage>(new TestProtocolString(mTest));
->>>>>>> 0.12
}