diff options
author | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2013-02-18 17:26:03 +0000 |
---|---|---|
committer | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2013-02-18 17:26:03 +0000 |
commit | b4f6aec19561c73c09077f5aff88854b42fb4a49 (patch) | |
tree | 76cc3ad5e382f1858420361e31a955910f589ae2 /test/nullary.cpp | |
parent | 1a056b408db75ef082b658ba0e5ff726a99018bb (diff) |
Fix linear vectorized transversal in linspace (fixes bug #526).
Diffstat (limited to 'test/nullary.cpp')
-rw-r--r-- | test/nullary.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/nullary.cpp b/test/nullary.cpp index 1220e3f97..5408d88b2 100644 --- a/test/nullary.cpp +++ b/test/nullary.cpp @@ -91,6 +91,12 @@ void testVectorType(const VectorType& base) scalar.setLinSpaced(1,low,high); VERIFY_IS_APPROX( scalar, ScalarMatrix::Constant(high) ); VERIFY_IS_APPROX( ScalarMatrix::LinSpaced(1,low,high), ScalarMatrix::Constant(high) ); + + // regression test for bug 526 (linear vectorized transversal) + if (size > 1) { + m.tail(size-1).setLinSpaced(low, high); + VERIFY_IS_APPROX(m(size-1), high); + } } template<typename MatrixType> |