Skip to content

Commit

Permalink
Fix CobylaState doc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
relf committed Apr 22, 2024
1 parent e1373f9 commit 54e1b32
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/cobyla_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ where
///
/// ```
/// # use argmin::core::{IterState, State};
/// # let state: IterState<Vec<f64>, (), (), (), (), f64> = IterState::new();
/// # use cobyla::CobylaState;
/// # let state = CobylaState::new();
/// # let param_old = vec![1.0f64, 2.0f64];
/// # let state = state.param(param_old);
/// # assert!(state.prev_param.is_none());
Expand Down Expand Up @@ -530,8 +531,9 @@ impl State for CobylaState {
/// # Example
///
/// ```
/// # use argmin::core::{IterState, State, ArgminFloat, TerminationStatus};
/// # let mut state: IterState<Vec<f64>, (), (), (), (), f64> = IterState::new();
/// # use argmin::core::{State, ArgminFloat, TerminationStatus};
/// # use cobyla::CobylaState;
/// # let mut state = CobylaState::new();
/// let termination_status = state.get_termination_status();
/// # assert_eq!(*termination_status, TerminationStatus::NotTerminated);
/// ```
Expand All @@ -544,8 +546,9 @@ impl State for CobylaState {
/// # Example
///
/// ```
/// # use argmin::core::{IterState, State, ArgminFloat, TerminationReason};
/// # let mut state: IterState<Vec<f64>, (), (), (), (), f64> = IterState::new();
/// # use argmin::core::{State, ArgminFloat, TerminationReason};
/// # use cobyla::CobylaState;
/// # let mut state = CobylaState::new();
/// let termination_reason = state.get_termination_reason();
/// # assert_eq!(termination_reason, None);
/// ```
Expand Down

0 comments on commit 54e1b32

Please sign in to comment.