ZoneCodeGenerator: Add tests for CommandFilePreprocessor

This commit is contained in:
Jan
2019-10-27 15:05:17 +01:00
parent d4da8645b1
commit 090efd98f0
2 changed files with 97 additions and 0 deletions

View File

@ -25,6 +25,27 @@ namespace ZoneCodeGeneratorTests.Parsing.C_Header.Impl
preprocessor = new Preprocessor(headerStreamTest, headerParserState);
}
[TestMethod]
public void EnsureReturnsUnmodifiedText()
{
string[] stringsThatShouldNotBeModified =
{
"This is a normal string",
"There is nothing to be preprocessed!",
"0124124124 # 124124124",
"...",
"<?php><html>asdf</html>",
""
};
headerStreamTest.Lines.AddRange(stringsThatShouldNotBeModified);
foreach (var stringThatShouldNotBeModified in stringsThatShouldNotBeModified)
{
Assert.AreEqual(stringThatShouldNotBeModified, preprocessor.ReadLine());
}
}
[TestMethod]
public void EnsureDefinesArePlacedCorrectly()
{