public static void CheckDELETE()
        {
            string testName = "Delete";
            string result   = PreprocessorUtils.ProcessCompilerDirectives(testName);

            PreprocessorUtils.CheckWithDirectiveResultFile(result, testName);
        }
        public static void CheckASTERISK_CONTROL_CBL()
        {
            string testName = "ControlCbl";
            string result   = PreprocessorUtils.ProcessCompilerDirectives(testName);

            PreprocessorUtils.CheckWithDirectiveResultFile(result, testName);
        }
        public static void CheckCBL_PROCESS()
        {
            string testName = "CblProcess";
            string result   = PreprocessorUtils.ProcessCompilerDirectives(testName);

            PreprocessorUtils.CheckWithDirectiveResultFile(result, testName);
        }
        public static void CheckSKIP1_2_3()
        {
            string testName = "Skip";
            string result   = PreprocessorUtils.ProcessCompilerDirectives(testName);

            PreprocessorUtils.CheckWithDirectiveResultFile(result, testName);
        }
        public static void CheckSERVICE_RELOAD()
        {
            string testName = "ServiceReload";
            string result   = PreprocessorUtils.ProcessCompilerDirectives(testName);

            PreprocessorUtils.CheckWithDirectiveResultFile(result, testName);
        }
Ejemplo n.º 6
0
        public void ExpandMacros(string input, string expandedInput, IEnumerable <string> macrosToParse, IEnumerable <string> predefinedMacros = null)
        {
            string expected = expandedInput;
            string actual   = PreprocessorUtils.ExpandMacros(input, macrosToParse.ToList(),
                                                             predefinedMacros == null ? new Dictionary <string, string>() : predefinedMacros.ToDictionary(s => s.Substring(0, s.IndexOf("=")), s => s.Substring(s.IndexOf("=") + 1)));

            Assert.Equal(expected, actual);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Expand certain macros directly
        /// </summary>
        private string ExpandMacros(string content, Dictionary <string, string> predefinedMacros)
        {
            var macrosToParse = new List <string>()
            {
                "BIFROST_NAMESPACE_BEGIN",
                "BIFROST_NAMESPACE_END",
            };

            return(PreprocessorUtils.ExpandMacros(content, macrosToParse, predefinedMacros));
        }
Ejemplo n.º 8
0
 public void Tokenize(string input, IEnumerable <string> tokens)
 {
     Assert.Equal(tokens, PreprocessorUtils.Tokenize(input));
 }