Fix bug added when adapting to new API.

Avoid using invalidated 'jacs', make copy.
This commit is contained in:
Atgeirr Flø Rasmussen 2015-03-10 12:53:22 +01:00
parent a4a3505fae
commit 5ff65b40e1

View File

@ -136,7 +136,8 @@ BOOST_AUTO_TEST_CASE(FunctionInitialisation)
}
ADB::V v_copy(v);
ADB f = ADB::function(std::move(v_copy), std::move(jacs));
std::vector<ADB::M> jacs_copy(jacs);
ADB f = ADB::function(std::move(v_copy), std::move(jacs_copy));
BOOST_REQUIRE(f.value().matrix() == v.matrix());