mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-05 08:49:03 +00:00
Move dependencies to the top level.
This commit is contained in:
+42
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include <tc/io/ISink.h>
|
||||
#include <tc/NotImplementedException.h>
|
||||
#include <tc/ArgumentOutOfRangeException.h>
|
||||
|
||||
class SinkTestUtil
|
||||
{
|
||||
public:
|
||||
static void testSinkLength(tc::io::ISink& source, int64_t expected_len);
|
||||
|
||||
class DummySinkBase : public tc::io::ISink
|
||||
{
|
||||
public:
|
||||
DummySinkBase();
|
||||
DummySinkBase(int64_t length);
|
||||
DummySinkBase(int64_t length, bool canSetLength);
|
||||
|
||||
void init(int64_t length, bool canSetLength);
|
||||
|
||||
int64_t length();
|
||||
void setLength(int64_t length);
|
||||
virtual size_t pushData(const tc::ByteData& data, int64_t offset);
|
||||
private:
|
||||
static const std::string kClassName;
|
||||
bool mCanSetLength;
|
||||
int64_t mLength;
|
||||
};
|
||||
|
||||
class DummySinkTestablePushData : public DummySinkBase
|
||||
{
|
||||
public:
|
||||
DummySinkTestablePushData();
|
||||
|
||||
void setExpectedPushDataCfg(const tc::ByteData& data, int64_t offset);
|
||||
|
||||
size_t pushData(const tc::ByteData& data, int64_t offset);
|
||||
private:
|
||||
std::shared_ptr<tc::ByteData> expected_data;
|
||||
std::shared_ptr<int64_t> expected_offset;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user