コード例 #1
0
        public void NoVariableDeclarations2()
        {
            var input   = "BEGIN 2 END";
            var program = LanguageService.Compile(input);

            Assert.Equal(2, program.RunSilently());
        }
コード例 #2
0
        public void WhenICompileTheProgram()
        {
            var source = (string)ScenarioContext.Current["Source"];

            try
            {
                var program = LanguageService.Compile(source);
                ScenarioContext.Current["Program"] = program;
            }
            catch (Exception ex)
            {
                ScenarioContext.Current["Error"] = ex.Message;
            }
        }