diff --git a/zackertypical/Calculator/.vs/Calculator/v15/.suo b/zackertypical/Calculator/.vs/Calculator/v15/.suo new file mode 100644 index 00000000..71a2068c Binary files /dev/null and b/zackertypical/Calculator/.vs/Calculator/v15/.suo differ diff --git a/zackertypical/Calculator/.vs/Calculator/v15/Solution.VC.db b/zackertypical/Calculator/.vs/Calculator/v15/Solution.VC.db new file mode 100644 index 00000000..e46997bb Binary files /dev/null and b/zackertypical/Calculator/.vs/Calculator/v15/Solution.VC.db differ diff --git a/zackertypical/Calculator/.vs/Calculator/v15/Solution.VC.db-shm b/zackertypical/Calculator/.vs/Calculator/v15/Solution.VC.db-shm new file mode 100644 index 00000000..7033286b Binary files /dev/null and b/zackertypical/Calculator/.vs/Calculator/v15/Solution.VC.db-shm differ diff --git a/zackertypical/Calculator/.vs/Calculator/v15/Solution.VC.db-wal b/zackertypical/Calculator/.vs/Calculator/v15/Solution.VC.db-wal new file mode 100644 index 00000000..f6e2077d Binary files /dev/null and b/zackertypical/Calculator/.vs/Calculator/v15/Solution.VC.db-wal differ diff --git a/zackertypical/Calculator/Calculator.sln b/zackertypical/Calculator/Calculator.sln new file mode 100644 index 00000000..68061759 --- /dev/null +++ b/zackertypical/Calculator/Calculator.sln @@ -0,0 +1,41 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27004.2010 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Calculator", "Calculator\Calculator.vcxproj", "{AD0D8876-F9E3-4915-B8E4-8DD98CB62382}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CalculatorUnitTest", "CalculatorUnitTest\CalculatorUnitTest.vcxproj", "{728B9E17-A736-45E9-A7A2-590A3E3CCA6C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AD0D8876-F9E3-4915-B8E4-8DD98CB62382}.Debug|x64.ActiveCfg = Debug|x64 + {AD0D8876-F9E3-4915-B8E4-8DD98CB62382}.Debug|x64.Build.0 = Debug|x64 + {AD0D8876-F9E3-4915-B8E4-8DD98CB62382}.Debug|x86.ActiveCfg = Debug|Win32 + {AD0D8876-F9E3-4915-B8E4-8DD98CB62382}.Debug|x86.Build.0 = Debug|Win32 + {AD0D8876-F9E3-4915-B8E4-8DD98CB62382}.Release|x64.ActiveCfg = Release|x64 + {AD0D8876-F9E3-4915-B8E4-8DD98CB62382}.Release|x64.Build.0 = Release|x64 + {AD0D8876-F9E3-4915-B8E4-8DD98CB62382}.Release|x86.ActiveCfg = Release|Win32 + {AD0D8876-F9E3-4915-B8E4-8DD98CB62382}.Release|x86.Build.0 = Release|Win32 + {728B9E17-A736-45E9-A7A2-590A3E3CCA6C}.Debug|x64.ActiveCfg = Debug|x64 + {728B9E17-A736-45E9-A7A2-590A3E3CCA6C}.Debug|x64.Build.0 = Debug|x64 + {728B9E17-A736-45E9-A7A2-590A3E3CCA6C}.Debug|x86.ActiveCfg = Debug|Win32 + {728B9E17-A736-45E9-A7A2-590A3E3CCA6C}.Debug|x86.Build.0 = Debug|Win32 + {728B9E17-A736-45E9-A7A2-590A3E3CCA6C}.Release|x64.ActiveCfg = Release|x64 + {728B9E17-A736-45E9-A7A2-590A3E3CCA6C}.Release|x64.Build.0 = Release|x64 + {728B9E17-A736-45E9-A7A2-590A3E3CCA6C}.Release|x86.ActiveCfg = Release|Win32 + {728B9E17-A736-45E9-A7A2-590A3E3CCA6C}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3051C700-012E-43A0-9D4D-0E4B40E1B4F5} + EndGlobalSection +EndGlobal diff --git a/zackertypical/Calculator/Calculator/Calculator.cpp b/zackertypical/Calculator/Calculator/Calculator.cpp new file mode 100644 index 00000000..fb6fc384 Binary files /dev/null and b/zackertypical/Calculator/Calculator/Calculator.cpp differ diff --git a/zackertypical/Calculator/Calculator/Calculator.h b/zackertypical/Calculator/Calculator/Calculator.h new file mode 100644 index 00000000..147c7904 --- /dev/null +++ b/zackertypical/Calculator/Calculator/Calculator.h @@ -0,0 +1,18 @@ +#pragma once +#include "stdafx.h" +#include +#include +#include +#include "stdlib.h" +#include +#include +using namespace std; + +class Calculator { +private: + string op[4] = { "+", "-", "*", "/" }; +public: + Calculator(); + string MakeFormula(); + string Solve(string formula); +}; \ No newline at end of file diff --git a/zackertypical/Calculator/Calculator/Calculator.vcxproj b/zackertypical/Calculator/Calculator/Calculator.vcxproj new file mode 100644 index 00000000..cc91217b --- /dev/null +++ b/zackertypical/Calculator/Calculator/Calculator.vcxproj @@ -0,0 +1,162 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {AD0D8876-F9E3-4915-B8E4-8DD98CB62382} + Win32Proj + Calculator + 10.0.16299.0 + + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + Use + Level3 + Disabled + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Use + Level3 + Disabled + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Use + Level3 + MaxSpeed + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + Use + Level3 + MaxSpeed + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + + + + + + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/zackertypical/Calculator/Calculator/Calculator.vcxproj.filters b/zackertypical/Calculator/Calculator/Calculator.vcxproj.filters new file mode 100644 index 00000000..41f3c5f7 --- /dev/null +++ b/zackertypical/Calculator/Calculator/Calculator.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 + + + + + 头文件 + + + 头文件 + + + 头文件 + + + + + 源文件 + + + 源文件 + + + \ No newline at end of file diff --git a/zackertypical/Calculator/Calculator/Debug/Calculator.log b/zackertypical/Calculator/Calculator/Debug/Calculator.log new file mode 100644 index 00000000..ed9609c6 --- /dev/null +++ b/zackertypical/Calculator/Calculator/Debug/Calculator.log @@ -0,0 +1,3 @@ + Calculator.cpp +c:\users\庄廓然\documents\_软件工程\calculator\zackertypical\calculator\calculator\calculator.cpp(90): warning C4018: “<”: 有符号/无符号不匹配 + Calculator.vcxproj -> C:\Users\庄廓然\Documents\_软件工程\Calculator\zackertypical\Calculator\Debug\Calculator.exe diff --git a/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/CL.command.1.tlog b/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/CL.command.1.tlog new file mode 100644 index 00000000..4a4c888b Binary files /dev/null and b/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/CL.command.1.tlog differ diff --git a/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/CL.read.1.tlog b/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/CL.read.1.tlog new file mode 100644 index 00000000..e498408c Binary files /dev/null and b/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/CL.read.1.tlog differ diff --git a/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/CL.write.1.tlog b/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/CL.write.1.tlog new file mode 100644 index 00000000..020e1c7e Binary files /dev/null and b/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/CL.write.1.tlog differ diff --git a/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/Calculator.lastbuildstate b/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/Calculator.lastbuildstate new file mode 100644 index 00000000..433a9136 --- /dev/null +++ b/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/Calculator.lastbuildstate @@ -0,0 +1,2 @@ +#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.16299.0 +Debug|Win32|C:\Users\庄廓然\Documents\_软件工程\Calculator\zackertypical\Calculator\| diff --git a/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/link.command.1.tlog b/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/link.command.1.tlog new file mode 100644 index 00000000..aa4be601 Binary files /dev/null and b/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/link.command.1.tlog differ diff --git a/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/link.read.1.tlog b/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/link.read.1.tlog new file mode 100644 index 00000000..9a08e944 Binary files /dev/null and b/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/link.read.1.tlog differ diff --git a/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/link.write.1.tlog b/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/link.write.1.tlog new file mode 100644 index 00000000..cd448fef Binary files /dev/null and b/zackertypical/Calculator/Calculator/Debug/Calculator.tlog/link.write.1.tlog differ diff --git a/zackertypical/Calculator/Calculator/Debug/calculator.obj.enc b/zackertypical/Calculator/Calculator/Debug/calculator.obj.enc new file mode 100644 index 00000000..061866dd Binary files /dev/null and b/zackertypical/Calculator/Calculator/Debug/calculator.obj.enc differ diff --git a/zackertypical/Calculator/Calculator/Debug/vc141.idb b/zackertypical/Calculator/Calculator/Debug/vc141.idb new file mode 100644 index 00000000..cb8a409c Binary files /dev/null and b/zackertypical/Calculator/Calculator/Debug/vc141.idb differ diff --git a/zackertypical/Calculator/Calculator/Debug/vc141.pdb b/zackertypical/Calculator/Calculator/Debug/vc141.pdb new file mode 100644 index 00000000..deb9acd5 Binary files /dev/null and b/zackertypical/Calculator/Calculator/Debug/vc141.pdb differ diff --git a/zackertypical/Calculator/Calculator/stdafx.cpp b/zackertypical/Calculator/Calculator/stdafx.cpp new file mode 100644 index 00000000..5df134e0 Binary files /dev/null and b/zackertypical/Calculator/Calculator/stdafx.cpp differ diff --git a/zackertypical/Calculator/Calculator/stdafx.h b/zackertypical/Calculator/Calculator/stdafx.h new file mode 100644 index 00000000..a9b830a8 Binary files /dev/null and b/zackertypical/Calculator/Calculator/stdafx.h differ diff --git a/zackertypical/Calculator/Calculator/targetver.h b/zackertypical/Calculator/Calculator/targetver.h new file mode 100644 index 00000000..e2da66c0 Binary files /dev/null and b/zackertypical/Calculator/Calculator/targetver.h differ diff --git a/zackertypical/Calculator/CalculatorUnitTest/CalculatorUnitTest.vcxproj b/zackertypical/Calculator/CalculatorUnitTest/CalculatorUnitTest.vcxproj new file mode 100644 index 00000000..f3b04eee --- /dev/null +++ b/zackertypical/Calculator/CalculatorUnitTest/CalculatorUnitTest.vcxproj @@ -0,0 +1,176 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {728B9E17-A736-45E9-A7A2-590A3E3CCA6C} + Win32Proj + CalculatorUnitTest + 10.0.16299.0 + NativeUnitTestProject + + + + DynamicLibrary + true + v141 + Unicode + false + + + DynamicLibrary + false + v141 + true + Unicode + false + + + DynamicLibrary + true + v141 + Unicode + false + + + DynamicLibrary + false + v141 + true + Unicode + false + + + + + + + + + + + + + + + + + + + + + true + + + true + + + true + + + true + + + + Use + Level3 + Disabled + $(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;%(PreprocessorDefinitions) + true + + + Windows + $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) + ..\Calculator\Debug\Calculator.obj;..\Calculator\Debug\stdafx.obj;%(AdditionalDependencies) + + + + + Use + Level3 + Disabled + $(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) + _DEBUG;%(PreprocessorDefinitions) + true + + + Windows + $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) + + + + + Level3 + Use + MaxSpeed + true + true + $(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;%(PreprocessorDefinitions) + true + + + Windows + true + true + $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) + + + + + Level3 + Use + MaxSpeed + true + true + $(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) + NDEBUG;%(PreprocessorDefinitions) + true + + + Windows + true + true + $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) + + + + + + + + + Create + Create + Create + Create + + + + + + {ad0d8876-f9e3-4915-b8e4-8dd98cb62382} + + + + + + \ No newline at end of file diff --git a/zackertypical/Calculator/CalculatorUnitTest/CalculatorUnitTest.vcxproj.filters b/zackertypical/Calculator/CalculatorUnitTest/CalculatorUnitTest.vcxproj.filters new file mode 100644 index 00000000..11980ad2 --- /dev/null +++ b/zackertypical/Calculator/CalculatorUnitTest/CalculatorUnitTest.vcxproj.filters @@ -0,0 +1,33 @@ + + + + + {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 + + + + + 头文件 + + + 头文件 + + + + + 源文件 + + + 源文件 + + + \ No newline at end of file diff --git a/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/CL.command.1.tlog b/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/CL.command.1.tlog new file mode 100644 index 00000000..bc9e712b Binary files /dev/null and b/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/CL.command.1.tlog differ diff --git a/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/CL.read.1.tlog b/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/CL.read.1.tlog new file mode 100644 index 00000000..4f001046 Binary files /dev/null and b/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/CL.read.1.tlog differ diff --git a/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/CL.write.1.tlog b/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/CL.write.1.tlog new file mode 100644 index 00000000..7a67e252 Binary files /dev/null and b/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/CL.write.1.tlog differ diff --git a/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/CalculatorUnitTest.lastbuildstate b/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/CalculatorUnitTest.lastbuildstate new file mode 100644 index 00000000..433a9136 --- /dev/null +++ b/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/CalculatorUnitTest.lastbuildstate @@ -0,0 +1,2 @@ +#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.16299.0 +Debug|Win32|C:\Users\庄廓然\Documents\_软件工程\Calculator\zackertypical\Calculator\| diff --git a/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/CalculatorUnitTest.write.1u.tlog b/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/CalculatorUnitTest.write.1u.tlog new file mode 100644 index 00000000..37f76898 Binary files /dev/null and b/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/CalculatorUnitTest.write.1u.tlog differ diff --git a/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/link.command.1.tlog b/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/link.command.1.tlog new file mode 100644 index 00000000..09a9236d Binary files /dev/null and b/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/link.command.1.tlog differ diff --git a/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/link.read.1.tlog b/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/link.read.1.tlog new file mode 100644 index 00000000..75cdc15e Binary files /dev/null and b/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/link.read.1.tlog differ diff --git a/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/link.write.1.tlog b/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/link.write.1.tlog new file mode 100644 index 00000000..4a66eb4f Binary files /dev/null and b/zackertypical/Calculator/CalculatorUnitTest/Debug/Calculat.728B9E17.tlog/link.write.1.tlog differ diff --git a/zackertypical/Calculator/CalculatorUnitTest/Debug/CalculatorUnitTest.log b/zackertypical/Calculator/CalculatorUnitTest/Debug/CalculatorUnitTest.log new file mode 100644 index 00000000..59266210 --- /dev/null +++ b/zackertypical/Calculator/CalculatorUnitTest/Debug/CalculatorUnitTest.log @@ -0,0 +1,2 @@ + unittest1.cpp + CalculatorUnitTest.vcxproj -> C:\Users\庄廓然\Documents\_软件工程\Calculator\zackertypical\Calculator\Debug\CalculatorUnitTest.dll diff --git a/zackertypical/Calculator/CalculatorUnitTest/Debug/vc141.idb b/zackertypical/Calculator/CalculatorUnitTest/Debug/vc141.idb new file mode 100644 index 00000000..5abb9eeb Binary files /dev/null and b/zackertypical/Calculator/CalculatorUnitTest/Debug/vc141.idb differ diff --git a/zackertypical/Calculator/CalculatorUnitTest/Debug/vc141.pdb b/zackertypical/Calculator/CalculatorUnitTest/Debug/vc141.pdb new file mode 100644 index 00000000..27954a91 Binary files /dev/null and b/zackertypical/Calculator/CalculatorUnitTest/Debug/vc141.pdb differ diff --git a/zackertypical/Calculator/CalculatorUnitTest/stdafx.cpp b/zackertypical/Calculator/CalculatorUnitTest/stdafx.cpp new file mode 100644 index 00000000..a0031370 --- /dev/null +++ b/zackertypical/Calculator/CalculatorUnitTest/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : ֻ׼ļԴļ +// CalculatorUnitTest.pch ΪԤͷ +// stdafx.obj ԤϢ + +#include "stdafx.h" + +// TODO: STDAFX.H κĸͷļ +//ڴļ diff --git a/zackertypical/Calculator/CalculatorUnitTest/stdafx.h b/zackertypical/Calculator/CalculatorUnitTest/stdafx.h new file mode 100644 index 00000000..3a1e49d2 --- /dev/null +++ b/zackertypical/Calculator/CalculatorUnitTest/stdafx.h @@ -0,0 +1,13 @@ +// stdafx.h : ׼ϵͳļİļ +// Ǿʹõĵ +// ضĿİļ +// + +#pragma once + +#include "targetver.h" + +// CppUnitTest ͷļ +#include "CppUnitTest.h" + +// TODO: ڴ˴óҪͷļ diff --git a/zackertypical/Calculator/CalculatorUnitTest/targetver.h b/zackertypical/Calculator/CalculatorUnitTest/targetver.h new file mode 100644 index 00000000..416cebf8 --- /dev/null +++ b/zackertypical/Calculator/CalculatorUnitTest/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// SDKDDKVer.h õ߰汾 Windows ƽ̨ + +// ҪΪǰ Windows ƽ̨Ӧó WinSDKVer.h +// _WIN32_WINNT ΪҪֵ֧ƽ̨Ȼٰ SDKDDKVer.h + +#include diff --git a/zackertypical/Calculator/CalculatorUnitTest/unittest1.cpp b/zackertypical/Calculator/CalculatorUnitTest/unittest1.cpp new file mode 100644 index 00000000..4e64bd7d --- /dev/null +++ b/zackertypical/Calculator/CalculatorUnitTest/unittest1.cpp @@ -0,0 +1,23 @@ +#include "stdafx.h" +#include "CppUnitTest.h" +#include "../Calculator/Calculator.h" + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +namespace CalculatorUnitTest +{ + TEST_CLASS(UnitTest1) + { + public: + + TEST_METHOD(TestMethod1) + { + Calculator* calc = new Calculator(); + string ret = calc->Solve("3+10+4-16"); + Assert::AreEqual(ret, (string)"3+10+4-16=1"); + ret = calc->Solve("11*15-5"); + Assert::AreEqual(ret, (string)"11*15-5=160"); + } + + }; +} \ No newline at end of file diff --git a/zackertypical/Calculator/Debug/Calculator.ilk b/zackertypical/Calculator/Debug/Calculator.ilk new file mode 100644 index 00000000..433e9099 Binary files /dev/null and b/zackertypical/Calculator/Debug/Calculator.ilk differ diff --git a/zackertypical/Calculator/Debug/Calculator.pdb b/zackertypical/Calculator/Debug/Calculator.pdb new file mode 100644 index 00000000..e3a8d725 Binary files /dev/null and b/zackertypical/Calculator/Debug/Calculator.pdb differ diff --git a/zackertypical/Calculator/Debug/CalculatorUnitTest.exp b/zackertypical/Calculator/Debug/CalculatorUnitTest.exp new file mode 100644 index 00000000..88d20304 Binary files /dev/null and b/zackertypical/Calculator/Debug/CalculatorUnitTest.exp differ diff --git a/zackertypical/Calculator/Debug/CalculatorUnitTest.ilk b/zackertypical/Calculator/Debug/CalculatorUnitTest.ilk new file mode 100644 index 00000000..1426a175 Binary files /dev/null and b/zackertypical/Calculator/Debug/CalculatorUnitTest.ilk differ diff --git a/zackertypical/Calculator/Debug/CalculatorUnitTest.pdb b/zackertypical/Calculator/Debug/CalculatorUnitTest.pdb new file mode 100644 index 00000000..24ec83e4 Binary files /dev/null and b/zackertypical/Calculator/Debug/CalculatorUnitTest.pdb differ diff --git "a/zackertypical/Calculator/\346\212\245\345\221\21220190224-1605.diagsession" "b/zackertypical/Calculator/\346\212\245\345\221\21220190224-1605.diagsession" new file mode 100644 index 00000000..29c94f0d Binary files /dev/null and "b/zackertypical/Calculator/\346\212\245\345\221\21220190224-1605.diagsession" differ diff --git "a/zackertypical/Calculator/\346\212\245\345\221\21220190224-1605.vspx" "b/zackertypical/Calculator/\346\212\245\345\221\21220190224-1605.vspx" new file mode 100644 index 00000000..7c6fece6 Binary files /dev/null and "b/zackertypical/Calculator/\346\212\245\345\221\21220190224-1605.vspx" differ