dimanche 3 décembre 2017

Visual Studio Unit Test: Unresolved external symbol

I'm trying to set up a test environment using VS2015. The test project and the project to be tested both reside in the same solution and I've added a reference to the project to be tested. The code to be tested is configured as a DLL. In The object browser, things look like this, which seems to suggest that my test subjects are available to the UnitTest1 project:

enter image description here

Still, when I actually try to use build a simple test case I get LNK2019 "unresolved exteral UnitTest1 symbol[...]"

The actual test code is:

TEST_METHOD(TestMethod1)
        {
            int value = 2;
            Testee t;
            t.set_attribute(value);
            //TODO add actual assertions
        }

Aucun commentaire:

Enregistrer un commentaire