From b4f6aec19561c73c09077f5aff88854b42fb4a49 Mon Sep 17 00:00:00 2001 From: Jitse Niesen Date: Mon, 18 Feb 2013 17:26:03 +0000 Subject: Fix linear vectorized transversal in linspace (fixes bug #526). --- test/nullary.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/nullary.cpp') 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 -- cgit v1.2.3