Nektar++
Typedefs | Functions
Nektar::DiagonalMatrixStoragePolicyUnitTests Namespace Reference

Typedefs

typedef DiagonalMatrixFuncs Policy
 

Functions

 BOOST_AUTO_TEST_CASE (TestAdvanceDiagonal)
 

Typedef Documentation

◆ Policy

Definition at line 45 of file TestDiagonalMatrixStoragePolicy.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

Nektar::DiagonalMatrixStoragePolicyUnitTests::BOOST_AUTO_TEST_CASE ( TestAdvanceDiagonal  )

Definition at line 47 of file TestDiagonalMatrixStoragePolicy.cpp.

48{
51
52 {
53 unsigned int curRow = 0;
54 unsigned int curColumn = 0;
55 std::tie(curRow, curColumn) = Policy::Advance(4, 4, curRow, curColumn);
56 BOOST_CHECK_EQUAL(1u, curRow);
57 BOOST_CHECK_EQUAL(1u, curColumn);
58
59 std::tie(curRow, curColumn) = Policy::Advance(4, 4, curRow, curColumn);
60 BOOST_CHECK_EQUAL(2u, curRow);
61 BOOST_CHECK_EQUAL(2u, curColumn);
62
63 std::tie(curRow, curColumn) = Policy::Advance(4, 4, curRow, curColumn);
64 BOOST_CHECK_EQUAL(3u, curRow);
65 BOOST_CHECK_EQUAL(3u, curColumn);
66
67 std::tie(curRow, curColumn) = Policy::Advance(2, 2, curRow, curColumn);
68 BOOST_CHECK_EQUAL(std::numeric_limits<unsigned int>::max(), curRow);
69 BOOST_CHECK_EQUAL(std::numeric_limits<unsigned int>::max(), curColumn);
70 }
71
72 {
73
74 unsigned int curRow = 0;
75 unsigned int curColumn = 0;
76 std::tie(curRow, curColumn) = Policy::Advance(1, 1, curRow, curColumn);
77 BOOST_CHECK_EQUAL(std::numeric_limits<unsigned int>::max(), curRow);
78 BOOST_CHECK_EQUAL(std::numeric_limits<unsigned int>::max(), curColumn);
79 }
80}
void RedirectCerrIfNeeded()
Definition: util.cpp:41

References Nektar::DiagonalMatrixFuncs::Advance(), and Nektar::UnitTests::RedirectCerrIfNeeded().