Пример #1
0
        public async Task Should_Throw_Exception()
        {
            FluentActions.Invoking(() => Healpers.Compile(SourcePath)).Should().Throw <T>().WithMessage(ExpectedMessage);

            // try
            // {
            //     var asm = Healpers.Compile(SourcePath);
            //
            //     FU
            //
            //     var asmPath = OutputPath + "out.s";
            //
            //     Healpers.WriteAsm(asmPath, asm);
            //
            //     Console.WriteLine($"Assembly saved to {asmPath}");
            //
            //     Healpers.GenerateExecutable(OutputPath + "program", asmPath);
            //
            //     Healpers.RunExecutable(OutputPath + "program");
            // }
            // catch (Exception e)
            // {
            //     e.Should().Be(Expected);
            // }
        }
Пример #2
0
        public async Task Should_Complete()
        {
            var asm = Healpers.Compile(SourcePath);

            var asmPath = OutputPath + "out.s";

            Healpers.WriteAsm(asmPath, asm);

            Console.WriteLine($"Assembly saved to {asmPath}");

            Healpers.GenerateExecutable(OutputPath + "program", asmPath).Should().Be(0);

            Healpers.RunExecutable(OutputPath + "program").Should().Be(ReturnValue);
        }