Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }