Mentions légales du service

Skip to content
Snippets Groups Projects
Commit e04330de authored by GUILLEMOT Alexandre's avatar GUILLEMOT Alexandre
Browse files

track tests macro

parent 0c238ebc
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,6 @@
use std::path::PathBuf;
#[test]
fn track() {
let path = PathBuf::from("data/2-2_1.json");
......@@ -37,3 +36,47 @@ fn track() {
}
}
}
macro_rules! nasty_examples {
($($name:ident: $e:expr,)*) => {
$(
#[test]
fn $name() {
println!("{}", $e);
let path = PathBuf::from($e);
let mut conf = algpath::cli::Configuration {
path: Some(path),
..Default::default()
};
conf.homogenize = true;
conf.horner = true;
let mut input_problem = algpath::cli::Problem::new_from_input(&conf).unwrap();
let mut parametric_system = input_problem.build_parametric_system(&conf).unwrap();
let path = &input_problem.path;
for point in &input_problem.fiber {
let proj_point = algpath::track::ProjectivePoint {
coord: point.clone().into(),
chart: 0,
};
let mbox = parametric_system
.find_moore_box(&path[0].clone().into(), proj_point, &mut Vec::new())
.unwrap();
let _tr = parametric_system
.track(mbox, &path[1].clone().into())
.unwrap();
}
}
)*
};
}
// Nasty examples description :
// nasty_1: linear homotopy with a single degree 9 polynomial that has 4 close roots
nasty_examples! {
nasty_1: "data/eric_1.json",
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment