From aee0474191aa6b4e4505e3f5a74b4ac8cc48063b Mon Sep 17 00:00:00 2001 From: jacqueline Date: Fri, 23 Jun 2023 15:31:45 +1000 Subject: Add a shared string library --- .../shared_string_test/SharedStringTest.cpp | 24 ++++++ .../shared_string_test/shared_string_test.sln | 22 +++++ .../shared_string_test/shared_string_test.vcxproj | 99 ++++++++++++++++++++++ .../shared_string_test.vcxproj.filters | 36 ++++++++ lib/shared_string/shared_string_test/stdafx.cpp | 8 ++ lib/shared_string/shared_string_test/stdafx.h | 6 ++ lib/shared_string/shared_string_test/targetver.h | 8 ++ 7 files changed, 203 insertions(+) create mode 100755 lib/shared_string/shared_string_test/SharedStringTest.cpp create mode 100755 lib/shared_string/shared_string_test/shared_string_test.sln create mode 100755 lib/shared_string/shared_string_test/shared_string_test.vcxproj create mode 100755 lib/shared_string/shared_string_test/shared_string_test.vcxproj.filters create mode 100755 lib/shared_string/shared_string_test/stdafx.cpp create mode 100755 lib/shared_string/shared_string_test/stdafx.h create mode 100755 lib/shared_string/shared_string_test/targetver.h (limited to 'lib/shared_string/shared_string_test') diff --git a/lib/shared_string/shared_string_test/SharedStringTest.cpp b/lib/shared_string/shared_string_test/SharedStringTest.cpp new file mode 100755 index 00000000..3bccf103 --- /dev/null +++ b/lib/shared_string/shared_string_test/SharedStringTest.cpp @@ -0,0 +1,24 @@ +#include "stdafx.h" +#include "CppUnitTest.h" +#include "../shared_string.h" + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +namespace shared_string_test +{ + TEST_CLASS(SharedStringTest) + { + public: + + TEST_METHOD(Assign) { + + shared_string s = "Test"; + + Assert::IsTrue(s == "Test"); + + s = "NO"; + + Assert::IsTrue(s == "NO"); + } + }; +} \ No newline at end of file diff --git a/lib/shared_string/shared_string_test/shared_string_test.sln b/lib/shared_string/shared_string_test/shared_string_test.sln new file mode 100755 index 00000000..2fac5c56 --- /dev/null +++ b/lib/shared_string/shared_string_test/shared_string_test.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared_string_test", "shared_string_test.vcxproj", "{79A93E93-50A8-46A3-A592-604F74C3BBEB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {79A93E93-50A8-46A3-A592-604F74C3BBEB}.Debug|Win32.ActiveCfg = Debug|Win32 + {79A93E93-50A8-46A3-A592-604F74C3BBEB}.Debug|Win32.Build.0 = Debug|Win32 + {79A93E93-50A8-46A3-A592-604F74C3BBEB}.Release|Win32.ActiveCfg = Release|Win32 + {79A93E93-50A8-46A3-A592-604F74C3BBEB}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/lib/shared_string/shared_string_test/shared_string_test.vcxproj b/lib/shared_string/shared_string_test/shared_string_test.vcxproj new file mode 100755 index 00000000..d2423735 --- /dev/null +++ b/lib/shared_string/shared_string_test/shared_string_test.vcxproj @@ -0,0 +1,99 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {79A93E93-50A8-46A3-A592-604F74C3BBEB} + Win32Proj + shared_string_test + + + + DynamicLibrary + true + v120 + Unicode + false + + + DynamicLibrary + false + v120 + true + Unicode + false + + + + + + + + + + + + + true + + + true + + + + Use + Level3 + Disabled + $(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;%(PreprocessorDefinitions) + true + + + Windows + true + $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) + + + + + Level3 + Use + MaxSpeed + true + true + $(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) + + + + + + + + + + Create + Create + + + + + + + \ No newline at end of file diff --git a/lib/shared_string/shared_string_test/shared_string_test.vcxproj.filters b/lib/shared_string/shared_string_test/shared_string_test.vcxproj.filters new file mode 100755 index 00000000..1ee25f1b --- /dev/null +++ b/lib/shared_string/shared_string_test/shared_string_test.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/lib/shared_string/shared_string_test/stdafx.cpp b/lib/shared_string/shared_string_test/stdafx.cpp new file mode 100755 index 00000000..539b4668 --- /dev/null +++ b/lib/shared_string/shared_string_test/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// shared_string_test.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/lib/shared_string/shared_string_test/stdafx.h b/lib/shared_string/shared_string_test/stdafx.h new file mode 100755 index 00000000..fde457b1 --- /dev/null +++ b/lib/shared_string/shared_string_test/stdafx.h @@ -0,0 +1,6 @@ +#pragma once + +#include "targetver.h" + +#include "CppUnitTest.h" + diff --git a/lib/shared_string/shared_string_test/targetver.h b/lib/shared_string/shared_string_test/targetver.h new file mode 100755 index 00000000..87c0086d --- /dev/null +++ b/lib/shared_string/shared_string_test/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include -- cgit v1.2.3