MCPcopy Create free account
hub / github.com/cpmech/plotpy / test_plot_title_handles_tex

Function test_plot_title_handles_tex

tests/test_plot.rs:189–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

187
188#[test]
189fn test_plot_title_handles_tex() -> Result<(), StrError> {
190 let mut plot = Plot::new();
191 plot.set_title("Van der Pol ($\\varepsilon = 10^{-6}$) - Radau5 - Tol = 1e-4");
192
193 // save figure
194 let path = Path::new(OUT_DIR).join("integ_plot_title_handles_tex.svg");
195 plot.set_figure_size_points(250.0, 250.0 * 0.75);
196 plot.save(&path)?;
197
198 // check number of lines
199 let file = File::open(path).map_err(|_| "cannot open file")?;
200 let buffered = BufReader::new(file);
201 let lines_iter = buffered.lines();
202 let count = lines_iter.count();
203 assert!(count > 800 && count < 850);
204 Ok(())
205}
206
207#[test]
208fn test_plot_subplots() -> Result<(), StrError> {

Callers

nothing calls this directly

Calls 3

saveMethod · 0.80
set_titleMethod · 0.45

Tested by

no test coverage detected