Lines Matching defs:expected
30 * and finally the expected result.
53 boolean result, boolean expected) {
54 if (expected != result) {
57 "\texpected " + expected + "\n" +
66 boolean result, boolean expected) {
67 if (expected != result) {
70 "\texpected " + expected + "\n" +
79 boolean result, boolean expected) {
80 if (expected != result) {
84 "\texpected " + expected + "\n" +
92 boolean result, boolean expected) {
93 if (expected != result) {
97 "\texpected " + expected + "\n" +
105 int result, int expected) {
106 if (expected != result) {
109 "\texpected " + expected + "\n" +
117 int result, int expected) {
118 if (expected != result) {
121 "\texpected " + expected + "\n" +
130 float result, float expected) {
131 if (Float.compare(expected, result) != 0 ) {
134 "\texpected " + expected + "\t(" + toHexString(expected) + ")\n" +
144 double result, double expected) {
145 if (Double.compare(expected, result ) != 0) {
148 "\texpected " + expected + "\t(" + toHexString(expected) + ")\n" +
158 float result, float expected) {
159 if (Float.compare(expected, result ) != 0) {
163 "\texpected " + expected + "\t(" + toHexString(expected) + ")\n" +
173 double result, double expected) {
174 if (Double.compare(expected, result ) != 0) {
178 "\texpected " + expected + "\t(" + toHexString(expected) + ")\n" +
188 float result, float expected) {
189 if (Float.compare(expected, result ) != 0) {
193 "\texpected " + expected + "\t(" + toHexString(expected) + ")\n" +
203 double result, double expected) {
204 if (Double.compare(expected, result ) != 0) {
208 "\texpected " + expected + "\t(" + toHexString(expected) + ")\n" +
216 static int testUlpCore(double result, double expected, double ulps) {
217 // We assume we won't be unlucky and have an inexact expected
222 if (Double.compare(expected, result) == 0) {
223 return 0; // result and expected are equivalent
229 double difference = expected - result;
230 if (FpUtils.isUnordered(expected, result) ||
233 !(Math.abs( difference/Math.ulp(expected) ) <= Math.abs(ulps)) ) {
244 double result, double expected, double ulps) {
245 int code = testUlpCore(result, expected, ulps);
249 "\texpected " + expected + "\t(" + toHexString(expected) + ")\n" +
258 double result, double expected, double ulps) {
259 int code = testUlpCore(result, expected, ulps);
264 "\texpected " + expected + "\t(" + toHexString(expected) + ")\n" +
272 // expected AND the result must have absolute value less than or
275 double result, double expected,
280 !Double.isNaN(expected)) {
283 code = testUlpCore(result, expected, ulps);
288 "\texpected " + expected + "\t(" + toHexString(expected) + ")\n" +
297 // expected AND the result must have absolute value greater than
300 double result, double expected,
304 if (!(result >= lowerBound) && !Double.isNaN(expected)) {
307 code = testUlpCore(result, expected, ulps);
313 "\n\texpected " + expected + "\t(" + toHexString(expected) + ")" +
322 double result, double expected, double tolerance) {
323 if (Double.compare(expected, result ) != 0) {
324 double difference = expected - result;
325 if (FpUtils.isUnordered(expected, result) ||
328 !(Math.abs((difference)/expected) <= StrictMath.pow(10, -tolerance)) ) {
331 "\texpected " + expected + "\t(" + toHexString(expected) + ")\n" +