I am trying to do a unit test for some C ++ code, but I am having problems.
I have something similar to the following lines of code ...
std::string s1 = obj->getName();
std::string s2 = "ExpectedName";
Assert::AreEqual(s1, s2, "Unexpected Object Name");
And I get the following compiler error ...
error C2665: 'Microsoft::VisualStudio::TestTools::UnitTesting::Assert::AreEqual' :
none of the 15 overloads could convert all the argument types
This seems to coincide with the following overload :
AreEqual<(Of <(T>)>)(T, T, String)
Not an overload of the above template overload, which should support any object if arguments 1 and 2 are of the same type? Or am I missing something?
Is there any other way I can fulfill this statement?
source
share