mirror of
https://github.com/keystone-engine/keystone
synced 2026-06-08 15:15:30 +00:00
1149b6b086
* Added support for CSharp * Minor changes to const_generator.py; Moved files according to the output of const_generator.py; Removed non-english comments; * Released keystone after tests
128 lines
5.2 KiB
C#
128 lines
5.2 KiB
C#
// ------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by SpecFlow (http://www.specflow.org/).
|
|
// SpecFlow Version:2.2.0.0
|
|
// SpecFlow Generator Version:2.0.0.0
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
// ------------------------------------------------------------------------------
|
|
#region Designer generated code
|
|
#pragma warning disable
|
|
namespace KeystoneNET.Tests
|
|
{
|
|
using TechTalk.SpecFlow;
|
|
|
|
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "2.2.0.0")]
|
|
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
|
[NUnit.Framework.TestFixtureAttribute()]
|
|
[NUnit.Framework.DescriptionAttribute("Compilation")]
|
|
public partial class CompilationFeature
|
|
{
|
|
|
|
private TechTalk.SpecFlow.ITestRunner testRunner;
|
|
|
|
#line 1 "Compilation.feature"
|
|
#line hidden
|
|
|
|
[NUnit.Framework.OneTimeSetUpAttribute()]
|
|
public virtual void FeatureSetup()
|
|
{
|
|
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
|
|
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Compilation", null, ProgrammingLanguage.CSharp, ((string[])(null)));
|
|
testRunner.OnFeatureStart(featureInfo);
|
|
}
|
|
|
|
[NUnit.Framework.OneTimeTearDownAttribute()]
|
|
public virtual void FeatureTearDown()
|
|
{
|
|
testRunner.OnFeatureEnd();
|
|
testRunner = null;
|
|
}
|
|
|
|
[NUnit.Framework.SetUpAttribute()]
|
|
public virtual void TestInitialize()
|
|
{
|
|
}
|
|
|
|
[NUnit.Framework.TearDownAttribute()]
|
|
public virtual void ScenarioTearDown()
|
|
{
|
|
testRunner.OnScenarioEnd();
|
|
}
|
|
|
|
public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
|
|
{
|
|
testRunner.OnScenarioStart(scenarioInfo);
|
|
}
|
|
|
|
public virtual void ScenarioCleanup()
|
|
{
|
|
testRunner.CollectScenarioErrors();
|
|
}
|
|
|
|
[NUnit.Framework.TestAttribute()]
|
|
[NUnit.Framework.DescriptionAttribute("Compile the nop instruction")]
|
|
public virtual void CompileTheNopInstruction()
|
|
{
|
|
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Compile the nop instruction", ((string[])(null)));
|
|
#line 3
|
|
this.ScenarioSetup(scenarioInfo);
|
|
#line 4
|
|
testRunner.Given("An instance of Keystone built for X86 in mode 32", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
|
|
#line 5
|
|
testRunner.And("The statement(s) \"nop\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
|
#line 6
|
|
testRunner.When("I compile the statement(s) with Keystone", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
|
#line 7
|
|
testRunner.Then("the result is 90", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
|
#line hidden
|
|
this.ScenarioCleanup();
|
|
}
|
|
|
|
[NUnit.Framework.TestAttribute()]
|
|
[NUnit.Framework.DescriptionAttribute("Compile an invalid instruction")]
|
|
public virtual void CompileAnInvalidInstruction()
|
|
{
|
|
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Compile an invalid instruction", ((string[])(null)));
|
|
#line 9
|
|
this.ScenarioSetup(scenarioInfo);
|
|
#line 10
|
|
testRunner.Given("An instance of Keystone built for X86 in mode 32", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
|
|
#line 11
|
|
testRunner.And("The statement(s) \"invalid instruction\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
|
#line 12
|
|
testRunner.When("I compile the statement(s) with Keystone", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
|
#line 13
|
|
testRunner.Then("The last error is ASM_MNEMONICFAIL", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
|
#line hidden
|
|
this.ScenarioCleanup();
|
|
}
|
|
|
|
[NUnit.Framework.TestAttribute()]
|
|
[NUnit.Framework.DescriptionAttribute("Compile a jump to label")]
|
|
public virtual void CompileAJumpToLabel()
|
|
{
|
|
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Compile a jump to label", ((string[])(null)));
|
|
#line 15
|
|
this.ScenarioSetup(scenarioInfo);
|
|
#line 16
|
|
testRunner.Given("An instance of Keystone built for X86 in mode 32", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
|
|
#line 17
|
|
testRunner.And("A dummy symbols resolver", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
|
#line 18
|
|
testRunner.And("The statement(s) \"jmp _unknownSymbol;nop;\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
|
#line 19
|
|
testRunner.When("I compile the statement(s) with Keystone", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
|
#line 20
|
|
testRunner.Then("the result is e9,aa,ab,ab,00,90", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
|
#line hidden
|
|
this.ScenarioCleanup();
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore
|
|
#endregion
|