Process() public method

public Process ( ) : string
return string
Exemplo n.º 1
0
Arquivo: Tests.cs Projeto: y-lohse/ink
        public void TestCommentEliminatorMixedNewlines()
        {
            var testContent =
                "A B\nC D // comment\nA B\r\nC D // comment\r\n/* block comment\r\nsecond line\r\n */ ";

            CommentEliminator p = new CommentEliminator(testContent);
            var result = p.Process();

            var expected =
                "A B\nC D \nA B\nC D \n\n\n ";

            Assert.AreEqual(expected, result);
        }
Exemplo n.º 2
0
Arquivo: Tests.cs Projeto: y-lohse/ink
        public void TestCommentEliminator()
        {
            var testContent =
            @"A// C
            A /* C */ A

            A * A * /* * C *// A/*
            C C C

            */";

            CommentEliminator p = new CommentEliminator(testContent);
            var result = p.Process();

            var expected = "A\nA  A\n\nA * A * / A\n\n\n";

            Assert.AreEqual(expected.Replace("\r", ""), result.Replace("\r", "")); //Windows perculiarity
        }