aboutsummaryrefslogtreecommitdiff
path: root/test/cxxtest/sample/msvc
diff options
context:
space:
mode:
authorMax Horn2006-03-29 10:25:48 +0000
committerMax Horn2006-03-29 10:25:48 +0000
commit3820593bb8dfdca4e2e17c70b278065b7f7894d9 (patch)
treedf3e8bebda3abcd99d0882dc9e8c6410f86850fb /test/cxxtest/sample/msvc
parent9c94670e22cb68e32fd38c0d2b009539e35d4a71 (diff)
downloadscummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.tar.gz
scummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.tar.bz2
scummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.zip
bringing cxxtest-3.10.1 to ScummVM's main branch
svn-id: r21488
Diffstat (limited to 'test/cxxtest/sample/msvc')
-rw-r--r--test/cxxtest/sample/msvc/CxxTest_1_Run.dsp93
-rw-r--r--test/cxxtest/sample/msvc/CxxTest_2_Build.dsp94
-rw-r--r--test/cxxtest/sample/msvc/CxxTest_3_Generate.dsp93
-rw-r--r--test/cxxtest/sample/msvc/CxxTest_Workspace.dsw59
-rw-r--r--test/cxxtest/sample/msvc/FixFiles.bat212
-rw-r--r--test/cxxtest/sample/msvc/Makefile36
-rw-r--r--test/cxxtest/sample/msvc/ReadMe.txt30
7 files changed, 617 insertions, 0 deletions
diff --git a/test/cxxtest/sample/msvc/CxxTest_1_Run.dsp b/test/cxxtest/sample/msvc/CxxTest_1_Run.dsp
new file mode 100644
index 0000000000..9ab9114d53
--- /dev/null
+++ b/test/cxxtest/sample/msvc/CxxTest_1_Run.dsp
@@ -0,0 +1,93 @@
+# Microsoft Developer Studio Project File - Name="CxxTest_1_Run" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) External Target" 0x0106
+
+CFG=CxxTest_1_Run - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "CxxTest_1_Run.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "CxxTest_1_Run.mak" CFG="CxxTest_1_Run - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "CxxTest_1_Run - Win32 Release" (based on "Win32 (x86) External Target")
+!MESSAGE "CxxTest_1_Run - Win32 Debug" (based on "Win32 (x86) External Target")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+
+!IF "$(CFG)" == "CxxTest_1_Run - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Cmd_Line "NMAKE /f CxxTest_1_Run.mak"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "CxxTest_1_Run.exe"
+# PROP BASE Bsc_Name "CxxTest_1_Run.bsc"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Cmd_Line "nmake DIR=Release run"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "Release\run.log"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "CxxTest_1_Run - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Cmd_Line "NMAKE /f CxxTest_1_Run.mak"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "CxxTest_1_Run.exe"
+# PROP BASE Bsc_Name "CxxTest_1_Run.bsc"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Cmd_Line "nmake DIR=Debug run"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "Debug\run.log"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ENDIF
+
+# Begin Target
+
+# Name "CxxTest_1_Run - Win32 Release"
+# Name "CxxTest_1_Run - Win32 Debug"
+
+!IF "$(CFG)" == "CxxTest_1_Run - Win32 Release"
+
+!ELSEIF "$(CFG)" == "CxxTest_1_Run - Win32 Debug"
+
+!ENDIF
+
+# Begin Source File
+
+SOURCE=.\Makefile
+# End Source File
+# Begin Source File
+
+SOURCE=.\ReadMe.txt
+# End Source File
+# End Target
+# End Project
diff --git a/test/cxxtest/sample/msvc/CxxTest_2_Build.dsp b/test/cxxtest/sample/msvc/CxxTest_2_Build.dsp
new file mode 100644
index 0000000000..301320d84b
--- /dev/null
+++ b/test/cxxtest/sample/msvc/CxxTest_2_Build.dsp
@@ -0,0 +1,94 @@
+# Microsoft Developer Studio Project File - Name="CxxTest_2_Build" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=CxxTest_2_Build - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "CxxTest_2_Build.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "CxxTest_2_Build.mak" CFG="CxxTest_2_Build - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "CxxTest_2_Build - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "CxxTest_2_Build - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "CxxTest_2_Build - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x40d /d "NDEBUG"
+# ADD RSC /l 0x40d /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"Release/runner.exe"
+
+!ELSEIF "$(CFG)" == "CxxTest_2_Build - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40d /d "_DEBUG"
+# ADD RSC /l 0x40d /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/runner.exe" /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "CxxTest_2_Build - Win32 Release"
+# Name "CxxTest_2_Build - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\ReadMe.txt
+# End Source File
+# Begin Source File
+
+SOURCE=.\runner.cpp
+# End Source File
+# End Target
+# End Project
diff --git a/test/cxxtest/sample/msvc/CxxTest_3_Generate.dsp b/test/cxxtest/sample/msvc/CxxTest_3_Generate.dsp
new file mode 100644
index 0000000000..1dd6d4dc5d
--- /dev/null
+++ b/test/cxxtest/sample/msvc/CxxTest_3_Generate.dsp
@@ -0,0 +1,93 @@
+# Microsoft Developer Studio Project File - Name="CxxTest_3_Generate" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) External Target" 0x0106
+
+CFG=CxxTest_3_Generate - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "CxxTest_3_Generate.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "CxxTest_3_Generate.mak" CFG="CxxTest_3_Generate - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "CxxTest_3_Generate - Win32 Release" (based on "Win32 (x86) External Target")
+!MESSAGE "CxxTest_3_Generate - Win32 Debug" (based on "Win32 (x86) External Target")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+
+!IF "$(CFG)" == "CxxTest_3_Generate - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Cmd_Line "NMAKE /f CxxTest_3_Generate.mak"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "CxxTest_3_Generate.exe"
+# PROP BASE Bsc_Name "CxxTest_3_Generate.bsc"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Cmd_Line "nmake runner.cpp"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "runner.cpp"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "CxxTest_3_Generate - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Cmd_Line "NMAKE /f CxxTest_3_Generate.mak"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "CxxTest_3_Generate.exe"
+# PROP BASE Bsc_Name "CxxTest_3_Generate.bsc"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Cmd_Line "nmake runner.cpp"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "runner.cpp"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ENDIF
+
+# Begin Target
+
+# Name "CxxTest_3_Generate - Win32 Release"
+# Name "CxxTest_3_Generate - Win32 Debug"
+
+!IF "$(CFG)" == "CxxTest_3_Generate - Win32 Release"
+
+!ELSEIF "$(CFG)" == "CxxTest_3_Generate - Win32 Debug"
+
+!ENDIF
+
+# Begin Source File
+
+SOURCE=.\Makefile
+# End Source File
+# Begin Source File
+
+SOURCE=.\ReadMe.txt
+# End Source File
+# End Target
+# End Project
diff --git a/test/cxxtest/sample/msvc/CxxTest_Workspace.dsw b/test/cxxtest/sample/msvc/CxxTest_Workspace.dsw
new file mode 100644
index 0000000000..9a88de6ef7
--- /dev/null
+++ b/test/cxxtest/sample/msvc/CxxTest_Workspace.dsw
@@ -0,0 +1,59 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "CxxTest_1_Run"=.\CxxTest_1_Run.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name CxxTest_2_Build
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "CxxTest_2_Build"=.\CxxTest_2_Build.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name CxxTest_3_Generate
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "CxxTest_3_Generate"=.\CxxTest_3_Generate.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/test/cxxtest/sample/msvc/FixFiles.bat b/test/cxxtest/sample/msvc/FixFiles.bat
new file mode 100644
index 0000000000..fb14a6c495
--- /dev/null
+++ b/test/cxxtest/sample/msvc/FixFiles.bat
@@ -0,0 +1,212 @@
+@rem = '--*-Perl-*--
+@echo off
+if "%OS%" == "Windows_NT" goto WinNT
+perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
+goto endofperl
+:WinNT
+perl -x -S %0 %*
+if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl
+if %errorlevel% == 9009 echo You do not have Perl in your PATH.
+if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul
+goto endofperl
+@rem ';
+#!/usr/bin/perl -w
+#line 15
+use strict;
+use English;
+use Getopt::Long;
+
+$OUTPUT_AUTOFLUSH = 1;
+
+sub usage() {
+ print STDERR "Usage: $0 <OPTIONS>\n\n";
+ print STDERR "Fix Makefile and CxxTest_2_Build.dsp for your setup.\n\n";
+ print STDERR " --cxxtest=DIR Assume CxxTest is installed in DIR (default: '..\\..')\n";
+ print STDERR " --tests=SPEC Use SPEC for the test files (default: '../gui/*.h ../*.h')\n\n";
+ print STDERR "You must specify at least one option.\n";
+ exit -1;
+}
+
+my ($cxxtest, $tests);
+my ($Makefile, $CxxTest_2_Build);
+
+sub main {
+ parseCommandline();
+ fixFiles();
+}
+
+sub parseCommandline() {
+ GetOptions( 'cxxtest=s' => \$cxxtest,
+ 'tests=s' => \$tests,
+ ) or usage();
+
+ usage() unless (defined($cxxtest) || defined($tests));
+ $cxxtest = '..\\..' unless defined($cxxtest);
+ $tests = '../gui/*.h ../*.h' unless defined($tests);
+}
+
+sub fixFiles() {
+ fixFile( $Makefile, 'Makefile' );
+ fixFile( $CxxTest_2_Build, 'CxxTest_2_Build.dsp' );
+}
+
+sub fixFile($$) {
+ my ($data, $output) = @_;
+
+ print "$output...";
+
+ $data =~ s/<TESTS>/$tests/g;
+ $data =~ s/<CXXTEST>/$cxxtest/g;
+
+ open OUTPUT, ">$output" or die "Cannot create output file \"$output\"\n";
+ print OUTPUT $data;
+ close OUTPUT;
+
+ print "OK\n";
+}
+
+$Makefile =
+'# Where to look for the tests
+TESTS = <TESTS>
+
+# Where the CxxTest distribution is unpacked
+CXXTESTDIR = <CXXTEST>
+
+# Check CXXTESTDIR
+!if !exist($(CXXTESTDIR)\cxxtestgen.pl)
+!error Please fix CXXTESTDIR
+!endif
+
+# cxxtestgen needs Perl or Python
+!if defined(PERL)
+CXXTESTGEN = $(PERL) $(CXXTESTDIR)/cxxtestgen.pl
+!elseif defined(PYTHON)
+CXXTESTGEN = $(PYTHON) $(CXXTESTDIR)/cxxtestgen.py
+!else
+!error You must define PERL or PYTHON
+!endif
+
+# The arguments to pass to cxxtestgen
+# - ParenPrinter is the way MSVC likes its compilation errors
+# - --have-eh/--abort-on-fail are nice when you have them
+CXXTESTGEN_FLAGS = --gui=Win32Gui --runner=ParenPrinter --have-eh --abort-on-fail
+
+# How to generate the test runner, "runner.cpp"
+runner.cpp: $(TESTS)
+ $(CXXTESTGEN) $(CXXTESTGEN_FLAGS) -o $@ $(TESTS)
+
+# Command-line arguments to the runner
+RUNNER_FLAGS = -title "CxxTest Runner"
+
+# How to run the tests, which should be in DIR\runner.exe
+run: $(DIR)\runner.exe
+ $(DIR)\runner.exe $(RUNNER_FLAGS)
+';
+
+$CxxTest_2_Build =
+'# Microsoft Developer Studio Project File - Name="CxxTest_2_Build" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=CxxTest_2_Build - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "CxxTest_2_Build.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "CxxTest_2_Build.mak" CFG="CxxTest_2_Build - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "CxxTest_2_Build - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "CxxTest_2_Build - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "CxxTest_2_Build - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "<CXXTEST>" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x40d /d "NDEBUG"
+# ADD RSC /l 0x40d /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"Release/runner.exe"
+
+!ELSEIF "$(CFG)" == "CxxTest_2_Build - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "<CXXTEST>" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40d /d "_DEBUG"
+# ADD RSC /l 0x40d /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/runner.exe" /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "CxxTest_2_Build - Win32 Release"
+# Name "CxxTest_2_Build - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\ReadMe.txt
+# End Source File
+# Begin Source File
+
+SOURCE=.\runner.cpp
+# End Source File
+# End Target
+# End Project
+';
+
+main();
+
+__END__
+:endofperl
+
+rem
+rem Local Variables:
+rem compile-command: "perl FixFiles.bat"
+rem End:
+rem
diff --git a/test/cxxtest/sample/msvc/Makefile b/test/cxxtest/sample/msvc/Makefile
new file mode 100644
index 0000000000..606004d4cf
--- /dev/null
+++ b/test/cxxtest/sample/msvc/Makefile
@@ -0,0 +1,36 @@
+# Where to look for the tests
+TESTS = ..\gui\*.h ..\*.h
+
+# Where the CxxTest distribution is unpacked
+CXXTESTDIR = ..\..
+
+# Check CXXTESTDIR
+!if !exist($(CXXTESTDIR)\cxxtestgen.pl)
+!error Please fix CXXTESTDIR
+!endif
+
+# cxxtestgen needs Perl or Python
+!if defined(PERL)
+CXXTESTGEN = $(PERL) $(CXXTESTDIR)/cxxtestgen.pl
+!elseif defined(PYTHON)
+CXXTESTGEN = $(PYTHON) $(CXXTESTDIR)/cxxtestgen.py
+!else
+!error You must define PERL or PYTHON
+!endif
+
+# The arguments to pass to cxxtestgen
+# - ParenPrinter is the way MSVC likes its compilation errors
+# - --have-eh/--abort-on-fail are nice when you have them
+CXXTESTGEN_FLAGS = \
+ --gui=Win32Gui \
+ --runner=ParenPrinter \
+ --have-eh \
+ --abort-on-fail
+
+# How to generate the test runner, `runner.cpp'
+runner.cpp: $(TESTS)
+ $(CXXTESTGEN) $(CXXTESTGEN_FLAGS) -o $@ $(TESTS)
+
+# How to run the tests, which should be in DIR\runner.exe
+run: $(DIR)\runner.exe
+ $(DIR)\runner.exe
diff --git a/test/cxxtest/sample/msvc/ReadMe.txt b/test/cxxtest/sample/msvc/ReadMe.txt
new file mode 100644
index 0000000000..816fce45b0
--- /dev/null
+++ b/test/cxxtest/sample/msvc/ReadMe.txt
@@ -0,0 +1,30 @@
+Sample files for Visual Studio
+==============================
+
+There are three projects in this workspace:
+
+ - CxxTest_3_Generate runs cxxtestgen to create runner.cpp
+ - CxxTest_2_Build compiles the generated file
+ - CxxTest_1_Run runs the compiled binary
+
+Whenever you build this workspace, the tests are run, and any failed assertions
+are displayed as compilation errors (you can browse them using F4).
+
+Note that to run this sample, you need first to create an environment
+variable PERL or PYTHON, e.g. PERL=c:\perl\bin\perl.exe
+
+
+To use these .dsp and .dsw files in your own project, run FixFiles.bat
+to adjust them to where you've placed CxxTest and your own tests.
+
+If you want to use just the .dsp files in your own workspace, don't
+forget to:
+
+ - Set up the dependencies (CxxTest_3_Generate depends on
+ CxxTest_2_Build which depends on CxxTest_1_Run)
+
+ - Add your own include paths, libraries etc. to the CxxTest_2_Build project
+
+
+NOTE: I haven't used "Post-Build Step" to run the tests because I
+wanted the tests to be executed even if nothing has changed.