mirror of
https://github.com/unittest-cpp/unittest-cpp
synced 2026-09-27 00:28:49 +03:00
r23 | charles.nicholson | 2010-03-18 19:14:06 -0500 (Thu, 18 Mar 2010) | 1 line
long long streaming for MemoryOutStream, from sony
This commit is contained in:
parent
7b9e3a17f8
commit
7510e7f42b
3 changed files with 55 additions and 15 deletions
|
|
@ -57,7 +57,7 @@ char const* MemoryOutStream::GetText() const
|
|||
return m_buffer;
|
||||
}
|
||||
|
||||
MemoryOutStream& MemoryOutStream::operator << (char const* txt)
|
||||
MemoryOutStream& MemoryOutStream::operator <<(char const* txt)
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
|
|
@ -74,37 +74,59 @@ MemoryOutStream& MemoryOutStream::operator << (char const* txt)
|
|||
return *this;
|
||||
}
|
||||
|
||||
MemoryOutStream& MemoryOutStream::operator << (int const n)
|
||||
MemoryOutStream& MemoryOutStream::operator <<(int const n)
|
||||
{
|
||||
FormatToStream(*this, "%i", n);
|
||||
return *this;
|
||||
}
|
||||
|
||||
MemoryOutStream& MemoryOutStream::operator << (long const n)
|
||||
MemoryOutStream& MemoryOutStream::operator <<(long const n)
|
||||
{
|
||||
FormatToStream(*this, "%li", n);
|
||||
return *this;
|
||||
}
|
||||
|
||||
MemoryOutStream& MemoryOutStream::operator << (unsigned long const n)
|
||||
MemoryOutStream& MemoryOutStream::operator <<(unsigned long const n)
|
||||
{
|
||||
FormatToStream(*this, "%lu", n);
|
||||
return *this;
|
||||
}
|
||||
|
||||
MemoryOutStream& MemoryOutStream::operator << (float const f)
|
||||
MemoryOutStream& MemoryOutStream::operator <<(long long const n)
|
||||
{
|
||||
#ifdef UNITTEST_WIN32
|
||||
FormatToStream(*this, "%I64d", n);
|
||||
#else
|
||||
FormatToStream(*this, "%lld", n);
|
||||
#endif
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
MemoryOutStream& MemoryOutStream::operator <<(unsigned long long const n)
|
||||
{
|
||||
#ifdef UNITTEST_WIN32
|
||||
FormatToStream(*this, "%I64u", n);
|
||||
#else
|
||||
FormatToStream(*this, "%llu", n);
|
||||
#endif
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
MemoryOutStream& MemoryOutStream::operator <<(float const f)
|
||||
{
|
||||
FormatToStream(*this, "%ff", f);
|
||||
return *this;
|
||||
}
|
||||
|
||||
MemoryOutStream& MemoryOutStream::operator << (void const* p)
|
||||
MemoryOutStream& MemoryOutStream::operator <<(void const* p)
|
||||
{
|
||||
FormatToStream(*this, "%p", p);
|
||||
return *this;
|
||||
}
|
||||
|
||||
MemoryOutStream& MemoryOutStream::operator << (unsigned int const s)
|
||||
MemoryOutStream& MemoryOutStream::operator <<(unsigned int const s)
|
||||
{
|
||||
FormatToStream(*this, "%u", s);
|
||||
return *this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue