35#include <boost/test/unit_test.hpp>
40#include <boost/test/tools/floating_point_comparison.hpp>
41#include <boost/test/unit_test.hpp>
53 unsigned int curRow = 0;
54 unsigned int curColumn = 0;
55 std::tie(curRow, curColumn) =
57 BOOST_CHECK_EQUAL(1, curRow);
58 BOOST_CHECK_EQUAL(0, curColumn);
60 std::tie(curRow, curColumn) =
62 BOOST_CHECK_EQUAL(2, curRow);
63 BOOST_CHECK_EQUAL(0, curColumn);
65 std::tie(curRow, curColumn) =
67 BOOST_CHECK_EQUAL(1, curRow);
68 BOOST_CHECK_EQUAL(1, curColumn);
70 std::tie(curRow, curColumn) =
72 BOOST_CHECK_EQUAL(2, curRow);
73 BOOST_CHECK_EQUAL(1, curColumn);
75 std::tie(curRow, curColumn) =
77 BOOST_CHECK_EQUAL(2, curRow);
78 BOOST_CHECK_EQUAL(2, curColumn);
80 std::tie(curRow, curColumn) =
82 BOOST_CHECK_EQUAL(std::numeric_limits<unsigned int>::max(), curRow);
83 BOOST_CHECK_EQUAL(std::numeric_limits<unsigned int>::max(), curColumn);
88 unsigned int curRow = 0;
89 unsigned int curColumn = 0;
90 std::tie(curRow, curColumn) =
92 BOOST_CHECK_EQUAL(std::numeric_limits<unsigned int>::max(), curRow);
93 BOOST_CHECK_EQUAL(std::numeric_limits<unsigned int>::max(), curColumn);
98 unsigned int curRow = 0;
99 unsigned int curColumn = 0;
100 std::tie(curRow, curColumn) =
102 BOOST_CHECK_EQUAL(1, curRow);
103 BOOST_CHECK_EQUAL(0, curColumn);
105 std::tie(curRow, curColumn) =
107 BOOST_CHECK_EQUAL(1, curRow);
108 BOOST_CHECK_EQUAL(1, curColumn);
110 std::tie(curRow, curColumn) =
112 BOOST_CHECK_EQUAL(std::numeric_limits<unsigned int>::max(), curRow);
113 BOOST_CHECK_EQUAL(std::numeric_limits<unsigned int>::max(), curColumn);
BOOST_AUTO_TEST_CASE(TestAdvanceLowerTriangular)
LowerTriangularMatrixFuncs Policy
void RedirectCerrIfNeeded()
static std::tuple< unsigned int, unsigned int > Advance(const unsigned int totalRows, const unsigned int totalColumns, const unsigned int curRow, const unsigned int curColumn, char transpose='N')