コード例 #1
0
        //@SetteRequiredStatementCoverage(value = 90)
        public static int guessResultParams(int x1, int x2, int x3)
        {
            SimpleObjectOverride obj = new SimpleObjectOverride();

            obj.addAbs(x1);
            obj.addAbs(x2);
            obj.addAbs(x3);

            if (obj.getResult() == 10)
            {
                return(1);
            }
            else
            {
                return(0);
            }
        }
コード例 #2
0
        //@SetteRequiredStatementCoverage(value = 85)
        public static int guessImpossibleParams(int x1, int x2, int x3)
        {
            SimpleObjectOverride obj = new SimpleObjectOverride();

            obj.addAbs(x1);
            obj.addAbs(x2);
            obj.addAbs(x3);

            if (obj.getResult() < 0)
            {
                // only with overflow
                return(1);
            }
            else
            {
                return(0);
            }
        }
コード例 #3
0
        //@SetteRequiredStatementCoverage(value = 95)
        public static int guessResult(SimpleObjectOverride obj, int x1,
                                      int x2, int x3)
        {
            if (obj == null)
            {
                return(-1);
            }

            obj.addAbs(x1);
            obj.addAbs(x2);
            obj.addAbs(x3);

            if (obj.getResult() == 10)
            {
                return(1);
            }
            else
            {
                return(0);
            }
        }
コード例 #4
0
        //@SetteRequiredStatementCoverage(value = 90)
        public static int guessImpossible(SimpleObjectOverride obj, int x1,
                                          int x2, int x3)
        {
            if (obj == null)
            {
                return(-1);
            }

            obj.addAbs(x1);
            obj.addAbs(x2);
            obj.addAbs(x3);

            if (obj.getResult() < 0)
            {
                // only with overflow
                return(1);
            }
            else
            {
                return(0);
            }
        }