I suggest you ...

Missing special templates 'ToString()' in file CppUnitTestAssert.h

For almost all integer types exists special template functions.

when using tpye INT64 or long long or INT_PTR in Assert::AreEqual()
I get a compile error saying:

c:\program files (x86)\microsoft visual studio 12.0\vc\unittest\include\cppunittestassert.h(66): error C2338: Test writer must define specialization of ToString<const Q& q> for your class class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > __cdecl Microsoft::VisualStudio::CppUnitTestFramework::ToString<__int64>(const __int64 &).

Could you add a specialization for long long?
You got one for UINT64:
template<> inline std::wstring ToString<unsigned long long> (const unsigned long long& t) \{ RETURN_WIDE_STRING(t); }

Hence I would guess the one for long logn was simply forgotten and would be easy to add:
template<> inline std::wstring ToString< long long> (const long long& t) \{ RETURN_WIDE_STRING(t);

Follow types missing:
- long long
- unsigned short


1 vote
Sign in
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Christian shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Password icon
Signed in as (Sign out)

Feedback and Knowledge Base