Exemplo n.º 1
0
        private void Check(List <string> inputs, List <ExtendedBitArray> args, List <ExtendedBitArray> prevStates,
                           List <ExtendedBitArray> nextStates, List <bool> overrides, List <int> result)
        {
            var controller = new FlagsController();

            for (var i = 0; i < inputs.Count; i++)
            {
                if (args != null)
                {
                    controller.SetArgument(args[i]);
                }
                controller.SetPreviousState(prevStates[i]);
                controller.UpdateFlags(nextStates[i], inputs[i], overrides[i]);
                Assert.AreEqual(result[i], controller.Flags.NumValue());
            }
        }