summaryrefslogtreecommitdiff
path: root/BCT/Test/BCTStmtTest
diff options
context:
space:
mode:
authorGravatar schaef <unknown>2009-11-20 13:36:51 +0000
committerGravatar schaef <unknown>2009-11-20 13:36:51 +0000
commit797711ee7fb126a081e00d8b247c0cfa83ddd3f2 (patch)
tree0dc9d7c53221b316160413ef3b66e9574724d84b /BCT/Test/BCTStmtTest
parent1ea222005d9d4722457f70cbd771fde5eed4d76f (diff)
Setting up test cases for BCT
Diffstat (limited to 'BCT/Test/BCTStmtTest')
-rw-r--r--BCT/Test/BCTStmtTest/Answer0
-rw-r--r--BCT/Test/BCTStmtTest/BCTStmtTest.sln20
-rw-r--r--BCT/Test/BCTStmtTest/BCTStmtTest/BCTStmtTest.csproj59
-rw-r--r--BCT/Test/BCTStmtTest/BCTStmtTest/Program.cs57
-rw-r--r--BCT/Test/BCTStmtTest/BCTStmtTest/Properties/AssemblyInfo.cs36
-rw-r--r--BCT/Test/BCTStmtTest/runtest.bat13
6 files changed, 185 insertions, 0 deletions
diff --git a/BCT/Test/BCTStmtTest/Answer b/BCT/Test/BCTStmtTest/Answer
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/BCT/Test/BCTStmtTest/Answer
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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{1016C04A-1854-4EB1-991F-64F40D1183AB}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>BCTStmtTest</RootNamespace>
+ <AssemblyName>BCTStmtTest</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\Binaries\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\Binaries\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project> \ 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
+)
+