Commit fe42f662 authored by Davis King's avatar Davis King

Slightly adjusted some of the unit tests to avoid false failures in some

environments.
parent 7999f6da
......@@ -77,7 +77,7 @@ namespace
// small error possible due to rounding and different optimization options
DLIB_TEST(res_diff <= 1);
DLIB_TEST(rect_confidence >= 0.98);
DLIB_TEST(rect_confidence >= 0.97);
print_spinner();
}
}
......
......@@ -1122,7 +1122,7 @@ namespace
DLIB_TEST(max(abs(m1*inv(m1) - identity_matrix(m1))) < 1e-13);
DLIB_TEST(max(abs(m2*inv(m2) - identity_matrix(m2))) < 1e-13);
DLIB_TEST(max(abs(m3*inv(m3) - identity_matrix(m3))) < 1e-13);
DLIB_TEST(max(abs(m4*inv(m4) - identity_matrix(m4))) < 1e-13);
DLIB_TEST_MSG(max(abs(m4*inv(m4) - identity_matrix(m4))) < 1e-12, max(abs(m4*inv(m4) - identity_matrix(m4))));
}
}
......
......@@ -128,7 +128,7 @@ namespace
w = join_cols(df.basis_vectors(0), uniform_matrix<double>(1,1,-df.b));
true_w = 0, 1, 0;
dlog << LINFO << "error: "<< max(abs(w-true_w));
DLIB_TEST(max(abs(w-true_w)) < 1e-10);
DLIB_TEST_MSG(max(abs(w-true_w)) < 1e-9, max(abs(w-true_w)));
print_spinner();
......@@ -193,7 +193,7 @@ namespace
w = join_cols(df.basis_vectors(0), uniform_matrix<double>(1,1,-df.b));
true_w = 1, 0, 0;
dlog << LINFO << "error: "<< max(abs(w-true_w));
DLIB_TEST(max(abs(w-true_w)) < 1e-10);
DLIB_TEST_MSG(max(abs(w-true_w)) < 1e-9, max(abs(w-true_w)));
......
......@@ -372,7 +372,7 @@ namespace
uniform_matrix<double>(x.size(),1,-1e100),
uniform_matrix<double>(x.size(),1,1e100),
(max(abs(x))+1)/10,
1e-7,
1e-8,
10000);
DLIB_TEST_MSG(dlib::equal(x,opt, 1e-3),opt-x);
DLIB_TEST(approx_equal(val , powell(x)));
......@@ -1151,8 +1151,8 @@ namespace
dlog << LINFO << "mean brown gradient: " << rs.mean();
dlog << LINFO << "max brown gradient: " << rs.max();
dlog << LINFO << "min brown gradient: " << rs.min();
DLIB_TEST(rs.mean() < 1e-5);
DLIB_TEST(rs.max() < 1e-2);
DLIB_TEST(rs.mean() < 4e-5);
DLIB_TEST_MSG(rs.max() < 3e-2, rs.max());
DLIB_TEST(rs.min() < 1e-10);
dlog << LINFO << "test find_max_box_constrained() on neg_rosen";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment