Added some tests for the new min/max functions.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402878
This commit is contained in:
Davis King 2009-02-28 19:08:35 +00:00
parent af25d30ad3
commit 4deccf5036
1 changed files with 8 additions and 0 deletions

View File

@ -1033,6 +1033,14 @@ namespace
DLIB_CASSERT(m3(0) == 1 && m3(1) == 5 ,"");
}
{
matrix<double> m(4,1);
m = 3, 1, 5, 2;
DLIB_CASSERT(index_of_min(m) == 1, "");
DLIB_CASSERT(index_of_max(m) == 2, "");
DLIB_CASSERT(index_of_min(trans(m)) == 1, "");
DLIB_CASSERT(index_of_max(trans(m)) == 2, "");
}
}