From 00f96886c951352867b17c458c9f6ae2bd44f743 Mon Sep 17 00:00:00 2001 From: Dorival Pedroso Date: Wed, 15 May 2024 22:04:14 +1000 Subject: [PATCH] Add test --- russell_ode/src/system.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/russell_ode/src/system.rs b/russell_ode/src/system.rs index a8082b79..4df2161a 100644 --- a/russell_ode/src/system.rs +++ b/russell_ode/src/system.rs @@ -249,7 +249,7 @@ mod tests { use russell_sparse::{CooMatrix, Sym}; #[test] - fn ode_system_most_none_works() { + fn ode_system_works() { struct Args { n_function_eval: usize, more_data_goes_here: bool, @@ -281,7 +281,7 @@ mod tests { } #[test] - fn ode_system_some_none_works() { + fn ode_system_set_jacobian_works() { struct Args { n_function_eval: usize, n_jacobian_eval: usize, @@ -348,5 +348,9 @@ mod tests { system.mass_put(0, 0, 1.0).err(), Some("mass matrix has not been initialized/enabled") ); + assert_eq!( + system.init_mass_matrix(1).err(), + Some("the Jacobian function must be enabled first") + ); } }