Tests.Tests.TestVariableDeclarationInConditional C# (CSharp) Method

TestVariableDeclarationInConditional() private method

private TestVariableDeclarationInConditional ( ) : void
return void
        public void TestVariableDeclarationInConditional()
        {
            var storyStr =
                @"
VAR x = 0
{true:
    - ~ x = 5
}
{x}
                ";

            Story story = CompileString(storyStr);

            // Extra newline is because there's a choice object sandwiched there,
            // so it can't be absorbed :-/
            Assert.AreEqual("5\n", story.Continue());
        }
Tests