I'm writing some unit tests using Microsoft's CppUnitTestFramework.
I want to test, if the method I call throws the correct exception. My code is:
TEST_METHOD(test_for_correct_exception_by_input_with_whitespaces)
{
std::string input{ "meet me at the corner" };
Assert::ExpectException<std::invalid_argument>(AutokeyCipher::encrypt(input, primer));
}
In the link below I wrote the call similar to the last answer:
When compiling it, I get the C2064 Error: term does not evaluate to a function taking 0 arguments
Why isn't that working?