diff --git "a/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/ConsoleApplication1.sln" "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/ConsoleApplication1.sln" new file mode 100644 index 0000000..5c30817 --- /dev/null +++ "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/ConsoleApplication1.sln" @@ -0,0 +1,48 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication1", "ConsoleApplication1\ConsoleApplication1.csproj", "{85385818-3D3F-4A8D-913B-8667B95A6CBC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestProject2", "TestProject2\TestProject2.csproj", "{05AC12AC-E091-4FFE-8851-89771BAC1C56}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2D7E5849-7917-44C9-A239-8917881454DA}" + ProjectSection(SolutionItems) = preProject + Local.testsettings = Local.testsettings + TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {85385818-3D3F-4A8D-913B-8667B95A6CBC}.Debug|Any CPU.ActiveCfg = Debug|x86 + {85385818-3D3F-4A8D-913B-8667B95A6CBC}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {85385818-3D3F-4A8D-913B-8667B95A6CBC}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {85385818-3D3F-4A8D-913B-8667B95A6CBC}.Debug|x86.ActiveCfg = Debug|x86 + {85385818-3D3F-4A8D-913B-8667B95A6CBC}.Debug|x86.Build.0 = Debug|x86 + {85385818-3D3F-4A8D-913B-8667B95A6CBC}.Release|Any CPU.ActiveCfg = Release|x86 + {85385818-3D3F-4A8D-913B-8667B95A6CBC}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {85385818-3D3F-4A8D-913B-8667B95A6CBC}.Release|Mixed Platforms.Build.0 = Release|x86 + {85385818-3D3F-4A8D-913B-8667B95A6CBC}.Release|x86.ActiveCfg = Release|x86 + {85385818-3D3F-4A8D-913B-8667B95A6CBC}.Release|x86.Build.0 = Release|x86 + {05AC12AC-E091-4FFE-8851-89771BAC1C56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {05AC12AC-E091-4FFE-8851-89771BAC1C56}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05AC12AC-E091-4FFE-8851-89771BAC1C56}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {05AC12AC-E091-4FFE-8851-89771BAC1C56}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {05AC12AC-E091-4FFE-8851-89771BAC1C56}.Debug|x86.ActiveCfg = Debug|Any CPU + {05AC12AC-E091-4FFE-8851-89771BAC1C56}.Release|Any CPU.ActiveCfg = Release|Any CPU + {05AC12AC-E091-4FFE-8851-89771BAC1C56}.Release|Any CPU.Build.0 = Release|Any CPU + {05AC12AC-E091-4FFE-8851-89771BAC1C56}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {05AC12AC-E091-4FFE-8851-89771BAC1C56}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {05AC12AC-E091-4FFE-8851-89771BAC1C56}.Release|x86.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git "a/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/ConsoleApplication1.vsmdi" "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/ConsoleApplication1.vsmdi" new file mode 100644 index 0000000..877249e --- /dev/null +++ "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/ConsoleApplication1.vsmdi" @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git "a/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/ConsoleApplication1/ConsoleApplication1.csproj" "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/ConsoleApplication1/ConsoleApplication1.csproj" new file mode 100644 index 0000000..9beb2da --- /dev/null +++ "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/ConsoleApplication1/ConsoleApplication1.csproj" @@ -0,0 +1,57 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {85385818-3D3F-4A8D-913B-8667B95A6CBC} + Exe + Properties + ConsoleApplication1 + ConsoleApplication1 + v4.0 + Client + 512 + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/ConsoleApplication1/Program.cs" "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/ConsoleApplication1/Program.cs" new file mode 100644 index 0000000..cd13e0d --- /dev/null +++ "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/ConsoleApplication1/Program.cs" @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Data; + +namespace ConsoleApplication1 +{ + public class Program + { + public void GreatCalculation(int n) + { + bool test = false; + Random r = new Random(); + int op = r.Next(2, 4);//符号数 + List l = new List(); + List f = new List(); + for (int li = 0; li < n; ) + { + for (int i = 0; i < op; i++) + { + f.Add(r.Next(1, 5)); + + } + for (int i = 0; i <= op; i++) + { + l.Add(r.Next(0, 100)); + } + Dictionary h = new Dictionary { { 1, "+" }, { 2, "-" }, { 3, "*" }, { 4, "/" } }; + for (int i = 0; i < f.Count(); i++) + { + if (h[f[i]] == "/" && l[i] == 0) + test = false; + else + test = true; + } + string str = ""; + for (int i = 0; i < f.Count; ) + { + if (i == 0) + { + str = l[i].ToString() + h[f[i]].ToString() + l[i + 1].ToString(); + i += 1; + } + else + { + str += h[f[i]].ToString() + l[i + 1].ToString(); + i += 1; + } + + } + if (test) + { + test = false; + DataTable table = new DataTable(); + var re = table.Compute(str, null); + int s; + if (int.TryParse(re.ToString(), out s)) + { + Console.WriteLine(str + "=" + re.ToString()); + test = true; + } + } + if (test == true) + li++; + l.Clear(); + f.Clear(); + } + + } + static void Main(string[] args) + { + Console.Write("请输入题目个数:"); + int n = Convert.ToInt32(Console.ReadLine()); + Program c = new Program(); + c.GreatCalculation(n); + } + } +} diff --git "a/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/ConsoleApplication1/Properties/AssemblyInfo.cs" "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/ConsoleApplication1/Properties/AssemblyInfo.cs" new file mode 100644 index 0000000..7d400c9 --- /dev/null +++ "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/ConsoleApplication1/Properties/AssemblyInfo.cs" @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("ConsoleApplication1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ConsoleApplication1")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("2eaf076b-98a5-4d0a-9440-d9abf7de27b4")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 内部版本号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git "a/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/Local.testsettings" "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/Local.testsettings" new file mode 100644 index 0000000..ccc6f81 --- /dev/null +++ "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/Local.testsettings" @@ -0,0 +1,10 @@ + + + 这些设置为本地测试运行的默认测试设置。 + + + + + + + \ No newline at end of file diff --git "a/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject1/Properties/AssemblyInfo.cs" "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject1/Properties/AssemblyInfo.cs" new file mode 100644 index 0000000..60a33dd --- /dev/null +++ "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject1/Properties/AssemblyInfo.cs" @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过下列特性集 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("TestProject1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("TestProject1")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的某个类型, +// 则将该类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("7ff9a543-339c-4d23-b657-7bc3fa21b1fb")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 内部版本号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git "a/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject1/TestProject1.csproj" "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject1/TestProject1.csproj" new file mode 100644 index 0000000..49bea5d --- /dev/null +++ "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject1/TestProject1.csproj" @@ -0,0 +1,59 @@ + + + + Debug + AnyCPU + + + 2.0 + {34DCFC73-80D3-4B4B-8637-F09C167F0B27} + Library + Properties + TestProject1 + TestProject1 + v4.0 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + 3.5 + + + + + False + + + + + + + + + \ No newline at end of file diff --git "a/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject1/UnitTest1.cs" "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject1/UnitTest1.cs" new file mode 100644 index 0000000..89fe360 --- /dev/null +++ "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject1/UnitTest1.cs" @@ -0,0 +1,17 @@ +using System; +using System.Text; +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace TestProject1 +{ + [TestClass] + public class UnitTest1 + { + [TestMethod] + public void TestMethod1() + { + } + } +} diff --git "a/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject2/Properties/AssemblyInfo.cs" "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject2/Properties/AssemblyInfo.cs" new file mode 100644 index 0000000..3c32a03 --- /dev/null +++ "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject2/Properties/AssemblyInfo.cs" @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过下列特性集 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("TestProject2")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("TestProject2")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的某个类型, +// 则将该类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("75bce78e-9872-45dd-bbc1-e741a93ebaaf")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 内部版本号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git "a/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject2/TestProject2.csproj" "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject2/TestProject2.csproj" new file mode 100644 index 0000000..bcbfa3b --- /dev/null +++ "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject2/TestProject2.csproj" @@ -0,0 +1,65 @@ + + + + Debug + AnyCPU + + + 2.0 + {05AC12AC-E091-4FFE-8851-89771BAC1C56} + Library + Properties + TestProject2 + TestProject2 + v4.0 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + 3.5 + + + + + False + + + + + + + + + {85385818-3D3F-4A8D-913B-8667B95A6CBC} + ConsoleApplication1 + + + + + \ No newline at end of file diff --git "a/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject2/UnitTest1.cs" "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject2/UnitTest1.cs" new file mode 100644 index 0000000..83e55ca --- /dev/null +++ "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TestProject2/UnitTest1.cs" @@ -0,0 +1,17 @@ +using System; +using System.Text; +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace TestProject2 +{ + [TestClass] + public class UnitTest1 + { + [TestMethod] + public void TestMethod1() + { + } + } +} diff --git "a/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TraceAndTestImpact.testsettings" "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TraceAndTestImpact.testsettings" new file mode 100644 index 0000000..d0b1e54 --- /dev/null +++ "b/a2084054502/\345\233\233\345\210\231\350\277\220\347\256\227/TraceAndTestImpact.testsettings" @@ -0,0 +1,21 @@ + + + 这些设置为跟踪和测试影响的测试设置。 + + + + + + + + + + + + + + + + + + \ No newline at end of file