diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/fx_string_testhelpers.cpp | 13 | ||||
-rw-r--r-- | testing/fx_string_testhelpers.h | 10 |
2 files changed, 18 insertions, 5 deletions
diff --git a/testing/fx_string_testhelpers.cpp b/testing/fx_string_testhelpers.cpp index 443cc89ed1..e2ce9353fb 100644 --- a/testing/fx_string_testhelpers.cpp +++ b/testing/fx_string_testhelpers.cpp @@ -16,3 +16,16 @@ std::ostream& operator<<(std::ostream& os, const CFX_DateTime& dt) { << std::to_string(dt.GetMillisecond()); return os; } + +CFX_InvalidSeekableReadStream::CFX_InvalidSeekableReadStream( + FX_FILESIZE data_size) + : data_size_(data_size) {} + +CFX_InvalidSeekableReadStream::~CFX_InvalidSeekableReadStream() = default; + +CFX_BufferSeekableReadStream::CFX_BufferSeekableReadStream( + const unsigned char* src, + size_t src_size) + : data_(src), data_size_(src_size) {} + +CFX_BufferSeekableReadStream::~CFX_BufferSeekableReadStream() = default; diff --git a/testing/fx_string_testhelpers.h b/testing/fx_string_testhelpers.h index 5a269a3cf6..cb59cfbc03 100644 --- a/testing/fx_string_testhelpers.h +++ b/testing/fx_string_testhelpers.h @@ -25,10 +25,10 @@ class CFX_InvalidSeekableReadStream : public IFX_SeekableReadStream { FX_FILESIZE GetSize() override { return data_size_; } private: - explicit CFX_InvalidSeekableReadStream(FX_FILESIZE data_size) - : data_size_(data_size) {} + explicit CFX_InvalidSeekableReadStream(FX_FILESIZE data_size); + ~CFX_InvalidSeekableReadStream() override; - FX_FILESIZE data_size_; + const FX_FILESIZE data_size_; }; class CFX_BufferSeekableReadStream : public IFX_SeekableReadStream { @@ -55,8 +55,8 @@ class CFX_BufferSeekableReadStream : public IFX_SeekableReadStream { } private: - CFX_BufferSeekableReadStream(const unsigned char* src, size_t src_size) - : data_(src), data_size_(src_size) {} + CFX_BufferSeekableReadStream(const unsigned char* src, size_t src_size); + ~CFX_BufferSeekableReadStream() override; const unsigned char* data_; size_t data_size_; |