use pounce_algorithm::application::IpoptApplication;
#[test]
fn fallback_option_defaults_off() {
let mut app = IpoptApplication::new();
let (value, _found) = app
.options_mut()
.get_bool_value("mu_strategy_fallback", "")
.expect("option must be registered");
assert!(!value, "μ-strategy fallback must default to off");
}
#[test]
fn fallback_option_accepts_string_yes() {
let mut app = IpoptApplication::new();
app.options_mut()
.set_string_value("mu_strategy_fallback", "yes", true, false)
.expect("string 'yes' must round-trip into the bool option");
let (value, found) = app
.options_mut()
.get_bool_value("mu_strategy_fallback", "")
.unwrap();
assert!(found && value, "after set 'yes', the switch reads true");
app.options_mut()
.set_string_value("mu_strategy_fallback", "no", true, false)
.unwrap();
let (value, _) = app
.options_mut()
.get_bool_value("mu_strategy_fallback", "")
.unwrap();
assert!(!value, "after set 'no', the switch reads false");
}