I had a C++ unit test class that used to work fine in VS2013.
I installed VS2015 and now it complains that TestContext in the code below is in error:
"parameter of abstract type "Microsoft::VisualStudio::TestTools::UnitTesting::TestContext is not allowed"
I've also tested using ClassInitialize attribute, but that doesn't work as well.
Here is a snipped of the code:
[TestClass]
public ref class Integration_ShotLibraryTests
{
public:
[AssemblyInitialize]
static void AssemblyInit(TestContext context)
{
SHOT_EPSILONS = new SwingResult();
SHOT_EPSILONS->SpeedMilesPerHour = 1.0;
SHOT_EPSILONS->PathInOutDeg = 0.25;
SHOT_EPSILONS->FaceOpenClosed = 0.5;
SHOT_EPSILONS->AngleOfAttackDeg = 0.25;
SHOT_EPSILONS->LieDeg = 0.5;
SHOT_EPSILONS->LoftDeg = 0.5;
SHOT_EPSILONS->ImpactLocationUpDownMm = 1.0;
SHOT_EPSILONS->ImpactLocationLeftRightMm = 1.0;
}
I'm using Visual Studio Enterprise 2015 (14.0.23107.0 D14REL)
Aucun commentaire:
Enregistrer un commentaire