예제 #1
0
        public static int TestOP8_eq(OP8 o1, byte b)
        {
            int count = 0;

            for (int x = 0; x < 256; x++)
            {
                if ((b == x) == o1.eval((byte)x))
                {
                    count += 1;
                }
            }
            return(count);
        }
예제 #2
0
        public static int TestOP8_lt(OP8 o1, byte b)   // find operator greater equal than b
        {
            int count = 0;

            for (int x = 0; x < 256; x++)
            {
                if ((b > x) == o1.eval((byte)x))
                {
                    count += 1;
                }
            }
            return(count);
        }
예제 #3
0
        public static int TestOP8_excludeRange(OP8 o1, byte min, byte max)
        {
            int count = 0;

            for (int x = 0; x < 256; x++)
            {
                bool b = (x >= min && x <= max);
                if (b && !o1.eval((byte)x))
                {
                    count += 1;
                }
            }
            return(count);
        }