Beispiel #1
0
        public static void CheckComments()
        {
            string     testName       = "Comments1";
            TokensLine testTokensLine = new TestTokensLine('*', "This is a comment line ! ***");
            string     result         = ScannerUtils.ScanTextLine(testTokensLine);

            ScannerUtils.CheckWithResultFile(result, testName);

            testName = "Comments2";
            string testLine = "01 TOTO *> Comment until end of line 1.";

            result = ScannerUtils.ScanLine(testLine);
            ScannerUtils.CheckWithResultFile(result, testName);

            testName = "CommentsDebugging";
            string[] testLines = new string[] {
                "D CONFIGURATION SECTION.",
                "SOURCE-COMPUTER. IBM-392 WITH DEBUGGING MODE.",
                "D DISPLAY TOTO"
            };
            result = ScannerUtils.ScanLines(testLines);
            ScannerUtils.CheckWithResultFile(result, testName);
        }