Example #1
0
        public void Switch_Enum_Casting()
        {
            var varialbes = new Dictionary <VariableSymbol, object>();
            var evaluator = new SwitchEnumEvaluator(_expressions[4], varialbes);

            for (int i = 0; i < N; i++)
            {
                evaluator.Evaluate();
            }
        }
Example #2
0
        public void Random_Switch_Enum_Casting()
        {
            var varialbes = new Dictionary <VariableSymbol, object>();
            var rnd       = new Random(DateTime.Now.Second);

            for (int i = 0; i < N; i++)
            {
                varialbes.Clear();
                varialbes.Add(_testVarialbe, 10);
                var index     = rnd.Next(0, 4);
                var evaluator = new SwitchEnumEvaluator(_expressions[index], varialbes);
                evaluator.Evaluate();
            }
        }