mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-20 20:04:26 +08:00
Fix swap test for size 1 inputs.
This commit is contained in:
parent
7882408856
commit
baf9a985ec
@ -24,10 +24,13 @@ struct other_matrix_type<Matrix<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCo
|
|||||||
template <typename MatrixType>
|
template <typename MatrixType>
|
||||||
typename internal::enable_if<(MatrixType::RowsAtCompileTime==1 || MatrixType::RowsAtCompileTime==Dynamic), void>::type
|
typename internal::enable_if<(MatrixType::RowsAtCompileTime==1 || MatrixType::RowsAtCompileTime==Dynamic), void>::type
|
||||||
check_row_swap(MatrixType& m1) {
|
check_row_swap(MatrixType& m1) {
|
||||||
// test assertion on mismatching size -- matrix case
|
|
||||||
VERIFY_RAISES_ASSERT(m1.swap(m1.row(0)));
|
if (m1.rows() != 1) {
|
||||||
// test assertion on mismatching size -- xpr case
|
// test assertion on mismatching size -- matrix case
|
||||||
VERIFY_RAISES_ASSERT(m1.row(0).swap(m1));
|
VERIFY_RAISES_ASSERT(m1.swap(m1.row(0)));
|
||||||
|
// test assertion on mismatching size -- xpr case
|
||||||
|
VERIFY_RAISES_ASSERT(m1.row(0).swap(m1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename MatrixType>
|
template <typename MatrixType>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user