|
From: <di...@us...> - 2008-08-06 20:54:53
|
Revision: 307
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=307&view=rev
Author: dixond
Date: 2008-08-06 20:54:59 +0000 (Wed, 06 Aug 2008)
Log Message:
-----------
?\208?\159?\208?\181?\209?\128?\209?\136?\208?\176 ?\209?\128?\208?\190?\208?\177?\208?\190?\209?\135?\208?\176 ?\208?\178?\208?\181?\209?\128?\209?\129?\209?\150?\209?\143 ?\208?\186?\208?\187?\208?\176?\209?\129?\209?\131 Checker - ?\208?\186?\208?\187?\208?\176?\209?\129 ?\208?\180?\208?\187?\209?\143 ?\209?\128?\208?\190?\208?\177?\208?\190?\209?\130?\208?\184 ?\208?\183 ?\208?\178?\208?\176?\208?\187?\209?\150?\208?\180?\208?\176?\209?\130?\208?\190?\209?\128?\208?\190?\208?\188 ?\209?\131 ?\208?\178?\208?\184?\208?\179?\208?\187?\209?\143?\208?\180?\209?\150 ?\209?\129?\208?\186?\209?\128?\209?\150?\208?\191?\209?\130?\208?\176 ?\208?\189?\208?\176 ?\208?\188?\208?\190?\208?\178?\209?\150 Script.Net
Added Paths:
-----------
ACMServer/trunk/sharp tester/Checker/
ACMServer/trunk/sharp tester/Checker/Checker.cs
ACMServer/trunk/sharp tester/Checker/Checker.csproj
ACMServer/trunk/sharp tester/Checker/Checker.sln
ACMServer/trunk/sharp tester/Checker/Checker.suo
ACMServer/trunk/sharp tester/Checker/Properties/
ACMServer/trunk/sharp tester/Checker/Properties/AssemblyInfo.cs
ACMServer/trunk/sharp tester/Checker/ReadMe!.txt
ACMServer/trunk/sharp tester/Checker/bin/
ACMServer/trunk/sharp tester/Checker/bin/Debug/
ACMServer/trunk/sharp tester/Checker/bin/Debug/Checker.dll
ACMServer/trunk/sharp tester/Checker/bin/Debug/Checker.pdb
ACMServer/trunk/sharp tester/Checker/bin/Debug/MutanticFramework.dll
ACMServer/trunk/sharp tester/Checker/bin/Debug/ScriptDotNet.dll
ACMServer/trunk/sharp tester/Checker/obj/
ACMServer/trunk/sharp tester/Checker/obj/Checker.csproj.FileList.txt
ACMServer/trunk/sharp tester/Checker/obj/Debug/
ACMServer/trunk/sharp tester/Checker/obj/Debug/Checker.dll
ACMServer/trunk/sharp tester/Checker/obj/Debug/Checker.pdb
ACMServer/trunk/sharp tester/Checker/obj/Debug/ResolveAssemblyReference.cache
ACMServer/trunk/sharp tester/Checker/obj/Debug/TempPE/
ACMServer/trunk/sharp tester/Checker/scriptExample.txt
Added: ACMServer/trunk/sharp tester/Checker/Checker.cs
===================================================================
--- ACMServer/trunk/sharp tester/Checker/Checker.cs (rev 0)
+++ ACMServer/trunk/sharp tester/Checker/Checker.cs 2008-08-06 20:54:59 UTC (rev 307)
@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.IO;
+
+using ScriptDotNet;
+
+namespace Tester
+{
+ public enum CheckResult
+ {
+ AC,
+ WA,
+ PE,
+ OE
+ }
+ public class Checker
+ {
+ public string input;
+ public string output;
+ public string correctOutput;
+ public string scriptPath;
+
+ public Checker() { }
+
+ public Checker(string scriptPath,string input, string output, string correctOutput)
+ {
+ this.input = input;
+ this.output = output;
+ this.correctOutput = output;
+ this.scriptPath = scriptPath;
+ }
+
+ public Checker(string scriptPath, string input, string output)
+ : this(scriptPath,input,output,"") { }
+
+ public CheckResult Check()
+ {
+ Script scr = Script.Compile(File.ReadAllText(scriptPath));
+ scr.AddBuildInObject(input);
+ scr.AddBuildInObject(output);
+ scr.AddBuildInObject(correctOutput);
+ scr.Execute();
+ string result = scr.Lookup("result").ToString();
+ return (CheckResult)Enum.Parse(typeof(CheckResult), result);
+ }
+ }
+}
Added: ACMServer/trunk/sharp tester/Checker/Checker.csproj
===================================================================
--- ACMServer/trunk/sharp tester/Checker/Checker.csproj (rev 0)
+++ ACMServer/trunk/sharp tester/Checker/Checker.csproj 2008-08-06 20:54:59 UTC (rev 307)
@@ -0,0 +1,48 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{BAFD4E93-B37A-416F-807D-E2515ECB6498}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Checker</RootNamespace>
+ <AssemblyName>Checker</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</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>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="ScriptDotNet, Version=1.0.0.1, Culture=neutral, processorArchitecture=MSIL" />
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Checker.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\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
Added: ACMServer/trunk/sharp tester/Checker/Checker.sln
===================================================================
--- ACMServer/trunk/sharp tester/Checker/Checker.sln (rev 0)
+++ ACMServer/trunk/sharp tester/Checker/Checker.sln 2008-08-06 20:54:59 UTC (rev 307)
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Checker", "Checker.csproj", "{BAFD4E93-B37A-416F-807D-E2515ECB6498}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {BAFD4E93-B37A-416F-807D-E2515ECB6498}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BAFD4E93-B37A-416F-807D-E2515ECB6498}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BAFD4E93-B37A-416F-807D-E2515ECB6498}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BAFD4E93-B37A-416F-807D-E2515ECB6498}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
Property changes on: ACMServer/trunk/sharp tester/Checker/Checker.suo
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: ACMServer/trunk/sharp tester/Checker/Properties/AssemblyInfo.cs
===================================================================
--- ACMServer/trunk/sharp tester/Checker/Properties/AssemblyInfo.cs (rev 0)
+++ ACMServer/trunk/sharp tester/Checker/Properties/AssemblyInfo.cs 2008-08-06 20:54:59 UTC (rev 307)
@@ -0,0 +1,35 @@
+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("Checker")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Home")]
+[assembly: AssemblyProduct("Checker")]
+[assembly: AssemblyCopyright("Copyright © Home 2008")]
+[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("1d62a31f-a671-4aee-8370-ce3ceba8ae3b")]
+
+// 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 Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Added: ACMServer/trunk/sharp tester/Checker/ReadMe!.txt
===================================================================
--- ACMServer/trunk/sharp tester/Checker/ReadMe!.txt (rev 0)
+++ ACMServer/trunk/sharp tester/Checker/ReadMe!.txt 2008-08-06 20:54:59 UTC (rev 307)
@@ -0,0 +1,15 @@
+>>>>>>>>>>>>>>\xD4\xEE\xF0\xEC\xE0\xF2 \xF1\xEA\xF0\xB3\xEF\xF2\xEE\xE2\xEE\xE3\xEE \xF4\xE0\xE9\xEB\xF3<<<<<<<<<<<<<<
+\xD1\xEA\xF0\xB3\xEF\xF2\xE8 \xEF\xE8\xF8\xF3\xF2\xFC\xF1\xFF \xED\xE0 \xEC\xEE\xE2\xB3 Script.NET (\xF1\xE8\xED\xF2\xE0\xEA\xF1\xE8\xF1 \xEE\xEF\xE8\xF8\xF3 \xEF\xB3\xE7\xED\xB3\xF8\xE5)
+
+\xD1\xEA\xF0\xB3\xEF\xF2\xF3 \xE4\xEE\xF1\xF2\xF3\xEF\xED\xB3 \xED\xE0\xF1\xF2\xF3\xEF\xED\xB3 \xE7\xEC\xB3\xED\xED\xB3:
+input - \xE2\xF5\xB3\xE4\xED\xE8\xE9 \xF2\xE5\xF1\xF2 (\xEC\xEE\xE6\xE5 \xE1\xF3\xF2\xE8 \xEF\xEE\xF0\xEE\xE6\xED\xB3\xE9)
+output - \xE2\xE8\xF5\xB3\xE4 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xE8 \xE4\xEB\xFF \xEF\xE5\xF0\xE5\xE2\xB3\xF0\xEA\xE8
+correctOutput - \xEA\xEE\xF0\xE5\xEA\xF2\xED\xE8\xE9 \xE2\xE8\xF5\xB3\xE4 (\xEC\xEE\xE6\xE5 \xE1\xF3\xF2\xE8 \xEF\xEE\xF0\xEE\xE6\xED\xB3\xE9)
+
+\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xE2\xE8\xEA\xEE\xED\xE0\xED\xED\xFF \xF1\xEA\xF0\xB3\xEF\xF2 \xE7\xE1\xE5\xF0\xB3\xE3\xE0\xBA \xF3 \xE7\xEC\xB3\xED\xED\xF3 result
+('WA','AC','PE','OE')
+>>>>>>>>>>>>>>>>>>\xCF\xF0\xE8\xEA\xEB\xE0\xE4<<<<<<<<<<<<<<<<<<<<<<<
+
+if (output==correctOutput)
+result='AC';
+else result='WA';
\ No newline at end of file
Property changes on: ACMServer/trunk/sharp tester/Checker/bin/Debug/Checker.dll
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: ACMServer/trunk/sharp tester/Checker/bin/Debug/Checker.pdb
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: ACMServer/trunk/sharp tester/Checker/bin/Debug/MutanticFramework.dll
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: ACMServer/trunk/sharp tester/Checker/bin/Debug/ScriptDotNet.dll
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: ACMServer/trunk/sharp tester/Checker/obj/Checker.csproj.FileList.txt
===================================================================
--- ACMServer/trunk/sharp tester/Checker/obj/Checker.csproj.FileList.txt (rev 0)
+++ ACMServer/trunk/sharp tester/Checker/obj/Checker.csproj.FileList.txt 2008-08-06 20:54:59 UTC (rev 307)
@@ -0,0 +1,6 @@
+bin\Debug\Checker.dll
+bin\Debug\Checker.pdb
+bin\Debug\MutanticFramework.dll
+obj\Debug\ResolveAssemblyReference.cache
+obj\Debug\Checker.dll
+obj\Debug\Checker.pdb
Property changes on: ACMServer/trunk/sharp tester/Checker/obj/Debug/Checker.dll
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: ACMServer/trunk/sharp tester/Checker/obj/Debug/Checker.pdb
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: ACMServer/trunk/sharp tester/Checker/obj/Debug/ResolveAssemblyReference.cache
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: ACMServer/trunk/sharp tester/Checker/scriptExample.txt
===================================================================
--- ACMServer/trunk/sharp tester/Checker/scriptExample.txt (rev 0)
+++ ACMServer/trunk/sharp tester/Checker/scriptExample.txt 2008-08-06 20:54:59 UTC (rev 307)
@@ -0,0 +1,3 @@
+if (output==correctOutput)
+result='AC';
+else result='WA';
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|