Exemplo n.º 1
0
        public void WhenHasPragmaInTheWrongPlace()
        {
            var lines  = Regex.Split(CODE_WITH_PRAGMA_WRONG_PLACE, "\r\n|\r|\n").ToImmutableList();
            var actual = string.Join("\n", CodePreprocessor.checkAndWritePragma(lines).ToArray());

            actual.shouldEqual(CODE_WITH_PRAGMA);
        }
Exemplo n.º 2
0
        public void WhenDoesntHavePragma()
        {
            var lines  = Regex.Split(CODE, "\r\n|\r|\n").ToImmutableList();
            var actual = string.Join("\n", CodePreprocessor.checkAndWritePragma(lines).ToArray());

            actual.shouldEqual(CODE_WITH_PRAGMA);
        }