For Programmers: Free Programming Magazines  


Home > Archive > Extreme Programming > February 2006 > how to use nunit in managed c++ in visual studio 2002?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author how to use nunit in managed c++ in visual studio 2002?
Ray Tayek

2006-02-08, 6:58 pm

hi, teaching a course using using managed c++ using visual studio 2003.
has anyone gotten nunit to work with this?

the cpp-sample project will open and build and nunit-gui 2.2.6 will open
the dll and run the tests.

compiling the code below makes an .exe and nunit throws when trying to
open the .exe. changing the project properties to make a .dll does'nt
seem to do anything.

I am used to java/eclipse/junit. how does one organise, build and run
src/ and tst/?

any pointers will be appreciated.

thanks

rtayek.no@spam.cecs.csulb.edu

// This is the main project file for VC++ application project
// generated using an Application Wizard.

#include "stdafx.h"

#using <mscorlib.dll>

using namespace System;
using namespace NUnit::Framework;

namespace NUnitSamples
{
[TestFixture]
public __gc class SimpleCPPSample
{
public:
[SetUp] void Init() {}
[Test] void Add() {}
};
}

int _tmain()
{
// TODO: Please replace the sample code below with your own.
Console::WriteLine(S"Hello World");
return 0;
}
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com