Esempio n. 1
0
        public void WhenDoesntHavePragma()
        {
            var lines  = Regex.Split(CODE, "\r\n|\r|\n").ToImmutableList();
            var actual = string.Join("\n", CodePreprocessor.checkAndRemovePragma(lines).ToArray());

            actual.shouldEqual(CODE);
        }
Esempio n. 2
0
        public void WhenHasPragmaInTheWrongPlace()
        {
            var lines  = Regex.Split(CODE_WITH_PRAGMA_WRONG_PLACE, "\r\n|\r|\n").ToImmutableList();
            var actual = string.Join("\n", CodePreprocessor.checkAndRemovePragma(lines).ToArray());

            actual.shouldEqual(CODE);
        }
Esempio n. 3
0
        public void WhenHasPragma()
        {
            var lines = Regex.Split(CODE_WITH_PRAGMA, "\r\n|\r|\n").ToImmutableList();

            CodePreprocessor.checkAndRemovePragma(lines).mkString("\n").shouldEqual(CODE);
        }