Пример #1
0
        public void NormalizeIndentationTest()
        {
            string expected = "\r\nclass Foo {\r\n    void Bar() {}\r\n}";
            string actual   = "\r\n\t\tclass Foo {\r\n\t\t    void Bar() {}\r\n\t\t}";

            StringsModule.AssertAreEqualIgnoringNewLineDifferences(expected.Trim(), StringsModule.NormalizeIndentation(actual));
        }
Пример #2
0
        public static void AssertCSharpCode(string expected, Node node)
        {
            var output = new StringWriter();

            node.Accept(new CSharpPrinter(output));

            StringsModule.AssertAreEqualIgnoringNewLineDifferences(
                StringsModule.NormalizeIndentation(expected),
                output.ToString().TrimEnd());
        }