Commit 6bab1f50 authored by Davis King's avatar Davis King

Added missing ; to DLIB_TEST and DLIB_TEST_MSG macros now that they are required.

parent a17e7f6b
......@@ -97,10 +97,10 @@ namespace
DLIB_TEST(a.node(1).number_of_children() == 2);
DLIB_TEST(a.node(1).number_of_parents() == 1);
DLIB_TEST_MSG(a.node(1).parent(0).index() == 1,"")
DLIB_TEST_MSG(a.node(1).parent(0).index() == 1,"");
DLIB_TEST_MSG(a.node(1).child(0).index() + a.node(1).child(1).index() == 3,"")
DLIB_TEST(a.node(2).number_of_children() == 0);
DLIB_TEST_MSG(a.node(1).child(0).index() + a.node(1).child(1).index() == 3,"");
DLIB_TEST(a.node(2).number_of_children() == 0);
DLIB_TEST(a.node(2).number_of_parents() == 1);
DLIB_TEST(a.node(2).index() == 2);
......
......@@ -370,7 +370,7 @@ namespace
}
DLIB_TEST_MSG(temp2 == "","")
DLIB_TEST_MSG(temp2 == "","");
}
}
......@@ -395,7 +395,7 @@ namespace
string::size_type pos = temp.find_first_not_of("e");
temp = temp.substr(pos);
}
DLIB_TEST_MSG(temp == "","decoded string: \"" << temp << "\"") /**/
DLIB_TEST_MSG(temp == "","decoded string: \"" << temp << "\""); /**/
dlog << LTRACE << 5;
......@@ -403,16 +403,16 @@ namespace
print_spinner();
temp = "davis";
temp = test<encoder,decoder>(temp); DLIB_TEST_MSG(temp == "","decoded string: \"" << temp << "\"")
temp = test<encoder,decoder>(temp); DLIB_TEST_MSG(temp == "","decoded string: \"" << temp << "\"");
temp = "";
temp = test<encoder,decoder>(temp); DLIB_TEST_MSG(temp == "","decoded string: \"" << temp << "\"")
temp = test<encoder,decoder>(temp); DLIB_TEST_MSG(temp == "","decoded string: \"" << temp << "\"");
// test for each single character
for ( int i = 0; i <= 255; ++i)
{
temp = (unsigned char)i;
temp = test<encoder,decoder>(temp); DLIB_TEST_MSG(temp == "","decoded string: \"" << temp << "\"")
temp = test<encoder,decoder>(temp); DLIB_TEST_MSG(temp == "","decoded string: \"" << temp << "\"");
}
dlog << LTRACE << 6;
......@@ -423,7 +423,7 @@ namespace
{
temp = temp + temp;
}
temp = test<encoder,decoder>(temp); DLIB_TEST_MSG(temp == "","decoded string: \"" << temp << "\"")
temp = test<encoder,decoder>(temp); DLIB_TEST_MSG(temp == "","decoded string: \"" << temp << "\"");
dlog << LTRACE << 7;
......@@ -437,7 +437,7 @@ namespace
int a = ::rand()%256;
temp += (unsigned char)a;
}
temp = test<encoder,decoder>(temp); DLIB_TEST_MSG(temp == "","decoded string: \"" << temp << "\"")
temp = test<encoder,decoder>(temp); DLIB_TEST_MSG(temp == "","decoded string: \"" << temp << "\"");
}
......@@ -457,7 +457,7 @@ namespace
int a = ::rand()%256;
temp += (unsigned char)a;
}
temp = test<encoder,decoder>(temp); DLIB_TEST_MSG(temp == "","seed: " << seed)
temp = test<encoder,decoder>(temp); DLIB_TEST_MSG(temp == "","seed: " << seed);
}
......@@ -478,7 +478,7 @@ namespace
string::size_type pos = temp.find_first_not_of(" ");
temp = temp.substr(pos);
}
DLIB_TEST_MSG(temp == "","decoded string: \"" << temp << "\"")/**/
DLIB_TEST_MSG(temp == "","decoded string: \"" << temp << "\"");/**/
......
......@@ -789,7 +789,7 @@ namespace
border_enumerator be(get_rect(imout),rect);
while (be.move_next())
{
DLIB_TEST(imout[be.element().y()][be.element().x()] == 0)
DLIB_TEST(imout[be.element().y()][be.element().x()] == 0);
}
DLIB_TEST_MSG(max(abs(subm(mat(imout),rect) - subm(out,rect))) < 1e-5, max(abs(subm(mat(imout),rect) - subm(out,rect))));
......@@ -800,7 +800,7 @@ namespace
be = border_enumerator(get_rect(imout),rect);
while (be.move_next())
{
DLIB_TEST(imout[be.element().y()][be.element().x()] == 10)
DLIB_TEST(imout[be.element().y()][be.element().x()] == 10);
}
out += abs(xcorr_same(mat(img),filt)/2);
DLIB_TEST(max(abs(subm(mat(imout),rect) - subm(out,rect))) < 1e-7);
......@@ -812,7 +812,7 @@ namespace
be = border_enumerator(get_rect(imout),rect);
while (be.move_next())
{
DLIB_TEST(imout[be.element().y()][be.element().x()] == -10)
DLIB_TEST(imout[be.element().y()][be.element().x()] == -10);
}
out += xcorr_same(mat(img),filt)/2;
DLIB_TEST_MSG(max(abs(subm(mat(imout),rect) - subm(out,rect))) < 1e-5, max(abs(subm(mat(imout),rect) - subm(out,rect))));
......
......@@ -42,22 +42,22 @@ namespace
void test_metaprog()
{
DLIB_TEST(has_booya2_template<htest>::value == true)
DLIB_TEST(has_booya2_template<htest2>::value == false)
DLIB_TEST(has_booya2_template<htest>::value == true);
DLIB_TEST(has_booya2_template<htest2>::value == false);
#if _MSC_VER > 1600 // there is a bug in visual studio 2010 and older that prevents this test from working
DLIB_TEST(has_booya_template<htest>::value == true)
DLIB_TEST(has_booya_template<htest>::value == true);
#endif
DLIB_TEST(has_booya_template<htest2>::value == false)
DLIB_TEST(has_booya_template<htest2>::value == false);
DLIB_TEST(has_funct_int<htest>::value == false)
DLIB_TEST(has_funct_int<htest2>::value == true)
DLIB_TEST(has_funct_double<htest>::value == true)
DLIB_TEST(has_funct_double<htest2>::value == false)
DLIB_TEST(has_funct_int<htest>::value == false);
DLIB_TEST(has_funct_int<htest2>::value == true);
DLIB_TEST(has_funct_double<htest>::value == true);
DLIB_TEST(has_funct_double<htest2>::value == false);
DLIB_TEST(has_funct_f<htest>::value == false)
DLIB_TEST(has_funct_f<htest2>::value == true)
DLIB_TEST(has_funct_f<htest>::value == false);
DLIB_TEST(has_funct_f<htest2>::value == true);
}
class is_same_object_tester : public tester
......
......@@ -688,7 +688,7 @@ namespace
matrix<double> L = chol(m);
DLIB_TEST(equal(L*trans(L), m));
DLIB_TEST_MSG(equal(inv(m), inv_upper_triangular(trans(L))*inv_lower_triangular((L))), "")
DLIB_TEST_MSG(equal(inv(m), inv_upper_triangular(trans(L))*inv_lower_triangular((L))), "");
DLIB_TEST(equal(round_zeros(inv_upper_triangular(trans(L))*trans(L),1e-10), identity_matrix<double>(3), 1e-10));
DLIB_TEST(equal(round_zeros(inv_lower_triangular((L))*(L),1e-10) ,identity_matrix<double>(3),1e-10));
......@@ -713,9 +713,9 @@ namespace
matrix<double> L = chol(m);
DLIB_TEST_MSG(equal(L*trans(L), m, 1e-10), L*trans(L)-m);
DLIB_TEST_MSG(equal(inv(m), inv_upper_triangular(trans(L))*inv_lower_triangular((L))), "")
DLIB_TEST_MSG(equal(inv(m), trans(inv_lower_triangular(L))*inv_lower_triangular((L))), "")
DLIB_TEST_MSG(equal(inv(m), trans(inv_lower_triangular(L))*trans(inv_upper_triangular(trans(L)))), "")
DLIB_TEST_MSG(equal(inv(m), inv_upper_triangular(trans(L))*inv_lower_triangular((L))), "");
DLIB_TEST_MSG(equal(inv(m), trans(inv_lower_triangular(L))*inv_lower_triangular((L))), "");
DLIB_TEST_MSG(equal(inv(m), trans(inv_lower_triangular(L))*trans(inv_upper_triangular(trans(L)))), "");
DLIB_TEST_MSG(equal(round_zeros(inv_upper_triangular(trans(L))*trans(L),1e-10) , identity_matrix<double>(6), 1e-10),
round_zeros(inv_upper_triangular(trans(L))*trans(L),1e-10));
DLIB_TEST_MSG(equal(round_zeros(inv_lower_triangular((L))*(L),1e-10) ,identity_matrix<double>(6), 1e-10),
......@@ -747,7 +747,7 @@ namespace
matrix<double> L = chol(m);
DLIB_TEST_MSG(equal(L*trans(L), m, 1e-10), L*trans(L)-m);
DLIB_TEST_MSG(equal(inv(m), inv_upper_triangular(trans(L))*inv_lower_triangular((L))), "")
DLIB_TEST_MSG(equal(inv(m), inv_upper_triangular(trans(L))*inv_lower_triangular((L))), "");
DLIB_TEST_MSG(equal(round_zeros(inv_upper_triangular(trans(L))*trans(L),1e-10) , identity_matrix<double>(6), 1e-10),
round_zeros(inv_upper_triangular(trans(L))*trans(L),1e-10));
DLIB_TEST_MSG(equal(round_zeros(inv_lower_triangular((L))*(L),1e-10) ,identity_matrix<double>(6), 1e-10),
......
......@@ -832,9 +832,9 @@ namespace
DLIB_TEST(join_rows(a,a) == b);
DLIB_TEST(join_rows(a,abs(a)) == b);
DLIB_TEST(join_cols(trans(a), trans(a)) == trans(b));
DLIB_TEST(join_cols(a,a) == c)
DLIB_TEST(join_cols(a,abs(a)) == c)
DLIB_TEST(join_rows(trans(a),trans(a)) == trans(c))
DLIB_TEST(join_cols(a,a) == c);
DLIB_TEST(join_cols(a,abs(a)) == c);
DLIB_TEST(join_rows(trans(a),trans(a)) == trans(c));
}
{
......@@ -856,9 +856,9 @@ namespace
DLIB_TEST(join_rows(a,a) == b);
DLIB_TEST(join_rows(a,abs(a)) == b);
DLIB_TEST(join_cols(trans(a), trans(a)) == trans(b));
DLIB_TEST(join_cols(a,a) == c)
DLIB_TEST(join_cols(a,abs(a)) == c)
DLIB_TEST(join_rows(trans(a),trans(a)) == trans(c))
DLIB_TEST(join_cols(a,a) == c);
DLIB_TEST(join_cols(a,abs(a)) == c);
DLIB_TEST(join_rows(trans(a),trans(a)) == trans(c));
}
{
......@@ -883,9 +883,9 @@ namespace
DLIB_TEST(join_rows(a,a2) == b);
DLIB_TEST(join_rows(a2,a) == b);
DLIB_TEST(join_cols(trans(a2), trans(a)) == trans(b));
DLIB_TEST(join_cols(a2,a) == c)
DLIB_TEST(join_cols(a,a2) == c)
DLIB_TEST(join_rows(trans(a2),trans(a)) == trans(c))
DLIB_TEST(join_cols(a2,a) == c);
DLIB_TEST(join_cols(a,a2) == c);
DLIB_TEST(join_rows(trans(a2),trans(a)) == trans(c));
}
{
......
......@@ -164,8 +164,8 @@ namespace
DLIB_TEST(df.number_of_classes() == 3);
DLIB_TEST(df(samples[0]) == labels[0])
DLIB_TEST(df(samples[90]) == labels[90])
DLIB_TEST(df(samples[0]) == labels[0]);
DLIB_TEST(df(samples[90]) == labels[90]);
one_vs_all_decision_function<ova_trainer,
......@@ -184,8 +184,8 @@ namespace
deserialize(df3, fin);
DLIB_TEST(df3(samples[0]) == labels[0])
DLIB_TEST(df3(samples[90]) == labels[90])
DLIB_TEST(df3(samples[0]) == labels[0]);
DLIB_TEST(df3(samples[90]) == labels[90]);
res = test_multiclass_decision_function(df3, samples, labels);
DLIB_TEST(res == ans);
......@@ -240,8 +240,8 @@ namespace
DLIB_TEST(df.number_of_classes() == 3);
DLIB_TEST(df(samples[0]) == labels[0])
DLIB_TEST(df(samples[90]) == labels[90])
DLIB_TEST(df(samples[0]) == labels[0]);
DLIB_TEST(df(samples[90]) == labels[90]);
one_vs_all_decision_function<ova_trainer,
......@@ -260,8 +260,8 @@ namespace
deserialize(df3, fin);
DLIB_TEST(df3(samples[0]) == labels[0])
DLIB_TEST(df3(samples[90]) == labels[90])
DLIB_TEST(df3(samples[0]) == labels[0]);
DLIB_TEST(df3(samples[90]) == labels[90]);
res = test_multiclass_decision_function(df3, samples, labels);
DLIB_TEST(res == ans);
......
......@@ -165,8 +165,8 @@ namespace
DLIB_TEST(df.number_of_classes() == 3);
DLIB_TEST(df(samples[0]) == labels[0])
DLIB_TEST(df(samples[90]) == labels[90])
DLIB_TEST(df(samples[0]) == labels[0]);
DLIB_TEST(df(samples[90]) == labels[90]);
one_vs_one_decision_function<ovo_trainer,
......@@ -185,8 +185,8 @@ namespace
deserialize(df3, fin);
DLIB_TEST(df3(samples[0]) == labels[0])
DLIB_TEST(df3(samples[90]) == labels[90])
DLIB_TEST(df3(samples[0]) == labels[0]);
DLIB_TEST(df3(samples[90]) == labels[90]);
res = test_multiclass_decision_function(df3, samples, labels);
DLIB_TEST(res == ans);
......
......@@ -226,10 +226,10 @@ namespace
DLIB_TEST(p11.unique() == false);
// now p11, p2, and p22 all reference the same thing and the rest are null
DLIB_TEST_MSG((p11 < p2) == false,"")
DLIB_TEST_MSG((p2 < p11) == false,"")
DLIB_TEST_MSG((p11 < p2) == false,"");
DLIB_TEST_MSG((p2 < p11) == false,"");
DLIB_TEST(get_deleter<D>(p4) == 0);
DLIB_TEST(get_deleter<D>(p4) == 0);
p4 = p2;
DLIB_TEST(get_deleter<D>(p4) != 0);
DLIB_TEST(get_deleter<D>(p4) == get_deleter<D>(p2));
......
......@@ -49,7 +49,7 @@ namespace
for (int i = -1000; i <= 1000; ++i)
{
DLIB_TEST(s.peek() != EOF)
DLIB_TEST(s.peek() != EOF);
char ch1 = i;
char ch2 = s.get();
DLIB_TEST(ch1 == ch2);
......@@ -63,7 +63,7 @@ namespace
for (int i = -1000+6; i <= 1000; ++i)
{
DLIB_TEST(s.peek() != EOF)
DLIB_TEST(s.peek() != EOF);
char ch1 = i;
char ch2 = s.get();
DLIB_TEST(ch1 == ch2);
......
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