add googletest and correct partof class StreamRW

This commit is contained in:
Ivan Morozov
2022-07-25 18:47:10 +03:00
parent bbb8b19ee3
commit d29966342b
15 changed files with 247 additions and 58 deletions

15
Common/cppcf/stream.cpp Normal file
View File

@ -0,0 +1,15 @@
#include "stream.h"
std::streamsize CFCPP::Length(const CFCPP::Stream& st)
{
if (st.get() == nullptr)
return 0;
auto curPos = st->tellg();
st->seekg(0, std::ios_base::end);
auto ssize = st->tellg();
st->seekg(curPos);
return ssize;
}