From 797711ee7fb126a081e00d8b247c0cfa83ddd3f2 Mon Sep 17 00:00:00 2001 From: schaef Date: Fri, 20 Nov 2009 13:36:51 +0000 Subject: Setting up test cases for BCT --- BCT/Test/BCTStmtTest/Answer | 0 BCT/Test/BCTStmtTest/BCTStmtTest.sln | 20 ++++++++ .../BCTStmtTest/BCTStmtTest/BCTStmtTest.csproj | 59 ++++++++++++++++++++++ BCT/Test/BCTStmtTest/BCTStmtTest/Program.cs | 57 +++++++++++++++++++++ .../BCTStmtTest/Properties/AssemblyInfo.cs | 36 +++++++++++++ BCT/Test/BCTStmtTest/runtest.bat | 13 +++++ 6 files changed, 185 insertions(+) create mode 100644 BCT/Test/BCTStmtTest/Answer create mode 100644 BCT/Test/BCTStmtTest/BCTStmtTest.sln create mode 100644 BCT/Test/BCTStmtTest/BCTStmtTest/BCTStmtTest.csproj create mode 100644 BCT/Test/BCTStmtTest/BCTStmtTest/Program.cs create mode 100644 BCT/Test/BCTStmtTest/BCTStmtTest/Properties/AssemblyInfo.cs create mode 100644 BCT/Test/BCTStmtTest/runtest.bat (limited to 'BCT/Test/BCTStmtTest') diff --git a/BCT/Test/BCTStmtTest/Answer b/BCT/Test/BCTStmtTest/Answer new file mode 100644 index 00000000..e69de29b diff --git a/BCT/Test/BCTStmtTest/BCTStmtTest.sln b/BCT/Test/BCTStmtTest/BCTStmtTest.sln new file mode 100644 index 00000000..1035b5eb --- /dev/null +++ b/BCT/Test/BCTStmtTest/BCTStmtTest.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BCTStmtTest", "BCTStmtTest\BCTStmtTest.csproj", "{1016C04A-1854-4EB1-991F-64F40D1183AB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1016C04A-1854-4EB1-991F-64F40D1183AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1016C04A-1854-4EB1-991F-64F40D1183AB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1016C04A-1854-4EB1-991F-64F40D1183AB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1016C04A-1854-4EB1-991F-64F40D1183AB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/BCT/Test/BCTStmtTest/BCTStmtTest/BCTStmtTest.csproj b/BCT/Test/BCTStmtTest/BCTStmtTest/BCTStmtTest.csproj new file mode 100644 index 00000000..42f427c7 --- /dev/null +++ b/BCT/Test/BCTStmtTest/BCTStmtTest/BCTStmtTest.csproj @@ -0,0 +1,59 @@ + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {1016C04A-1854-4EB1-991F-64F40D1183AB} + Exe + Properties + BCTStmtTest + BCTStmtTest + v3.5 + 512 + + + true + full + false + ..\Binaries\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\Binaries\ + TRACE + prompt + 4 + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + + + + \ No newline at end of file diff --git a/BCT/Test/BCTStmtTest/BCTStmtTest/Program.cs b/BCT/Test/BCTStmtTest/BCTStmtTest/Program.cs new file mode 100644 index 00000000..a4c5e223 --- /dev/null +++ b/BCT/Test/BCTStmtTest/BCTStmtTest/Program.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace BCTStmtTest +{ + class Program + { + private int i; + + void BCTAssignments(int j) + { + i = 7; + int k; + k = i + 20; + i = k / j; + } + + int BCTConditional(int k) + { + int i=0; + if (k > 5) // ite + { + return 7; + } + else + { + i = k / 2; + } + + if (i < k) //if without else + { + i = 2; + } + + if (k > 5) // else if + { + return 7; + } + else if (k < 5) + { + i = k / 2; + } + else + { + return 100; + } + return 0; + } + + static void Main(string[] args) + { + + } + } +} diff --git a/BCT/Test/BCTStmtTest/BCTStmtTest/Properties/AssemblyInfo.cs b/BCT/Test/BCTStmtTest/BCTStmtTest/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..402d34a8 --- /dev/null +++ b/BCT/Test/BCTStmtTest/BCTStmtTest/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("BCTStmtTest")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("BCTStmtTest")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("9f9c2dec-8857-439e-8b6c-136d253cec34")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BCT/Test/BCTStmtTest/runtest.bat b/BCT/Test/BCTStmtTest/runtest.bat new file mode 100644 index 00000000..4d11e03f --- /dev/null +++ b/BCT/Test/BCTStmtTest/runtest.bat @@ -0,0 +1,13 @@ +@echo off +setlocal + +set BCTDIR=..\..\Binaries +set BEXE=%BCTDIR%\BytecodeTranslator.exe +set TESTDIR=Binaries +set TESTEXE=%TESTDIR%\BCTStmtTest.exe + +for %%f in (%TESTEXE%) do ( + echo -------------------- %%f -------------------- + %BEXE% %* %%f +) + -- cgit v1.2.3