mardi 5 juillet 2016

How to load string from resource when using Microsoft unit testing framework c++?

I'm learning how to develop and write unit tests and one of the issues I'm facing is a debug assertion when a test is trying to load from the resource. The code for example tests a function such as:

void className::function()
{
    CString str;
    str.LoadString(IDS_STRING);
    // more code etc.
}

Is there something wrong with my project dependencies/setup? Or am I not able to load from the string table when unit testing?

Aucun commentaire:

Enregistrer un commentaire