[Winmerge-svn] SF.net SVN: winmerge:[6449] trunk/Testing/GoogleTest
Windows visual diff and merge for files and directories
Brought to you by:
christianlist,
grimmdp
From: <ki...@us...> - 2009-02-12 18:20:32
|
Revision: 6449 http://winmerge.svn.sourceforge.net/winmerge/?rev=6449&view=rev Author: kimmov Date: 2009-02-12 18:20:28 +0000 (Thu, 12 Feb 2009) Log Message: ----------- Tests: Add unit test for UnicodeString. At the moment just one test to add the project. Added Paths: ----------- trunk/Testing/GoogleTest/UnicodeString/ trunk/Testing/GoogleTest/UnicodeString/UnicodeString.sln trunk/Testing/GoogleTest/UnicodeString/UnicodeString.vcproj trunk/Testing/GoogleTest/UnicodeString/UnicodeString_test.cpp Property changes on: trunk/Testing/GoogleTest/UnicodeString ___________________________________________________________________ Added: bugtraq:url + http://sourceforge.net/support/tracker.php?aid=%BUGID% Added: bugtraq:logregex + (\d{6,}) Added: trunk/Testing/GoogleTest/UnicodeString/UnicodeString.sln =================================================================== --- trunk/Testing/GoogleTest/UnicodeString/UnicodeString.sln (rev 0) +++ trunk/Testing/GoogleTest/UnicodeString/UnicodeString.sln 2009-02-12 18:20:28 UTC (rev 6449) @@ -0,0 +1,23 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnicodeString", "UnicodeString.vcproj", "{490015E3-D147-44D8-80DF-0C4D4BF3C0BF}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {490015E3-D147-44D8-80DF-0C4D4BF3C0BF}.Debug.ActiveCfg = Debug|Win32 + {490015E3-D147-44D8-80DF-0C4D4BF3C0BF}.Debug.Build.0 = Debug|Win32 + {490015E3-D147-44D8-80DF-0C4D4BF3C0BF}.Release.ActiveCfg = Release|Win32 + {490015E3-D147-44D8-80DF-0C4D4BF3C0BF}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal Property changes on: trunk/Testing/GoogleTest/UnicodeString/UnicodeString.sln ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/Testing/GoogleTest/UnicodeString/UnicodeString.vcproj =================================================================== --- trunk/Testing/GoogleTest/UnicodeString/UnicodeString.vcproj (rev 0) +++ trunk/Testing/GoogleTest/UnicodeString/UnicodeString.vcproj 2009-02-12 18:20:28 UTC (rev 6449) @@ -0,0 +1,144 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="UnicodeString" + ProjectGUID="{490015E3-D147-44D8-80DF-0C4D4BF3C0BF}" + Keyword="Win32Proj"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=""..\..\..\Src";"..\..\..\Src\Common"" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="TRUE" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="4"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="gtestd.lib" + OutputFile="$(OutDir)/UnicodeString.exe" + LinkIncremental="2" + AdditionalLibraryDirectories="".."" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile="$(OutDir)/UnicodeString.pdb" + SubSystem="1" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories=""..\..\..\Src";"..\..\..\Src\Common"" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="4" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="3"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="gtest.lib" + OutputFile="$(OutDir)/UnicodeString.exe" + LinkIncremental="1" + AdditionalLibraryDirectories="".."" + GenerateDebugInformation="TRUE" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + <File + RelativePath="..\..\..\Src\Common\UnicodeString.cpp"> + </File> + <File + RelativePath=".\UnicodeString_test.cpp"> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + <File + RelativePath="..\..\..\Src\Common\UnicodeString.h"> + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Property changes on: trunk/Testing/GoogleTest/UnicodeString/UnicodeString.vcproj ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/Testing/GoogleTest/UnicodeString/UnicodeString_test.cpp =================================================================== --- trunk/Testing/GoogleTest/UnicodeString/UnicodeString_test.cpp (rev 0) +++ trunk/Testing/GoogleTest/UnicodeString/UnicodeString_test.cpp 2009-02-12 18:20:28 UTC (rev 6449) @@ -0,0 +1,66 @@ +#include <gtest/gtest.h> +#include <windows.h> +#include <tchar.h> + +#include "UnicodeString.h" + +namespace +{ + // The fixture for testing paths functions. + class UnicodeStringTest : public testing::Test + { + protected: + // You can remove any or all of the following functions if its body + // is empty. + + UnicodeStringTest() + { + // You can do set-up work for each test here. + } + + virtual ~UnicodeStringTest() + { + // You can do clean-up work that doesn't throw exceptions here. + } + + // If the constructor and destructor are not enough for setting up + // and cleaning up each test, you can define the following methods: + + virtual void SetUp() + { + // Code here will be called immediately after the constructor (right + // before each test). + } + + virtual void TearDown() + { + // Code here will be called immediately after each test (right + // before the destructor). + } + + // Objects declared here can be used by all tests in the test case for Foo. + }; + + TEST_F(UnicodeStringTest, Construct1) + { + String str; + EXPECT_TRUE(str.empty()); + } + + TEST_F(UnicodeStringTest, Replace1) + { + String orig("OneTwoThree"); + String find("Two"); + String rep("Five"); + string_replace(orig, find, rep); + EXPECT_EQ("OneFiveThree", orig); + } + +} // namespace + +int main(int argc, char **argv) +{ + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} + Property changes on: trunk/Testing/GoogleTest/UnicodeString/UnicodeString_test.cpp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |