AjTalk.Tests.Compilers.SourceWriterTests.WriteFunctionWithIndent C# (CSharp) Méthode

WriteFunctionWithIndent() private méthode

private WriteFunctionWithIndent ( ) : void
Résultat void
        public void WriteFunctionWithIndent()
        {
            this.writer.WriteLine("foo()");
            this.writer.WriteLineStart("{");
            this.writer.WriteLine("a = 1;");
            this.writer.Write("b");
            this.writer.WriteLine(";");
            this.writer.WriteLineEnd("}");
            string[] lines = this.GetLines();
            Assert.IsTrue(lines.Contains("foo()"));
            Assert.IsTrue(lines.Contains("{"));
            Assert.IsTrue(lines.Contains("    a = 1;"));
            Assert.IsTrue(lines.Contains("    b;"));
            Assert.IsTrue(lines.Contains("}"));
            Assert.IsFalse(lines.Contains(string.Empty));
        }