+14
-15
@@ -2096,9 +2096,8 @@ fn full_command_sweep_against_real_hardware() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
{
|
{
|
||||||
let state = dsp
|
let state = dsp.state();
|
||||||
.state()
|
|
||||||
.expect("state should be populated after connect");
|
|
||||||
assert!(!state.name.is_empty(), "device name should be non-empty");
|
assert!(!state.name.is_empty(), "device name should be non-empty");
|
||||||
assert!(
|
assert!(
|
||||||
!state.presets.names.is_empty(),
|
!state.presets.names.is_empty(),
|
||||||
@@ -2120,7 +2119,7 @@ fn full_command_sweep_against_real_hardware() {
|
|||||||
.expect("set_delay_unit");
|
.expect("set_delay_unit");
|
||||||
assert!(ok);
|
assert!(ok);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
dsp.state().unwrap().current_config.delay_unit,
|
dsp.state().current_config.delay_unit,
|
||||||
types::DelayUnit::Millisecond
|
types::DelayUnit::Millisecond
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -2130,27 +2129,27 @@ fn full_command_sweep_against_real_hardware() {
|
|||||||
|
|
||||||
let ok = dsp.set_mute(in_ch, true).expect("set_mute");
|
let ok = dsp.set_mute(in_ch, true).expect("set_mute");
|
||||||
assert!(ok);
|
assert!(ok);
|
||||||
assert!(dsp.state().unwrap().current_config.input_states[&input].mute);
|
assert!(dsp.state().current_config.input_states[&input].mute);
|
||||||
|
|
||||||
let ok = dsp.set_mute(in_ch, false).expect("unmute");
|
let ok = dsp.set_mute(in_ch, false).expect("unmute");
|
||||||
assert!(ok);
|
assert!(ok);
|
||||||
assert!(!dsp.state().unwrap().current_config.input_states[&input].mute);
|
assert!(!dsp.state().current_config.input_states[&input].mute);
|
||||||
|
|
||||||
let ok = dsp.set_channel_gain(in_ch, -3.0).expect("set_channel_gain");
|
let ok = dsp.set_channel_gain(in_ch, -3.0).expect("set_channel_gain");
|
||||||
assert!(ok);
|
assert!(ok);
|
||||||
assert!((dsp.state().unwrap().current_config.input_states[&input].gain - (-3.0)).abs() < 0.01);
|
assert!((dsp.state().current_config.input_states[&input].gain - (-3.0)).abs() < 0.01);
|
||||||
|
|
||||||
let ok = dsp
|
let ok = dsp
|
||||||
.set_channel_inverse_gain(in_ch, true)
|
.set_channel_inverse_gain(in_ch, true)
|
||||||
.expect("set_channel_inverse_gain");
|
.expect("set_channel_inverse_gain");
|
||||||
assert!(ok);
|
assert!(ok);
|
||||||
assert!(dsp.state().unwrap().current_config.input_states[&input].phase_inverted);
|
assert!(dsp.state().current_config.input_states[&input].phase_inverted);
|
||||||
dsp.set_channel_inverse_gain(in_ch, false)
|
dsp.set_channel_inverse_gain(in_ch, false)
|
||||||
.expect("revert phase");
|
.expect("revert phase");
|
||||||
|
|
||||||
let ok = dsp
|
let ok = dsp
|
||||||
.set_channel_delay(in_ch, 1.5, types::DelayUnit::Millisecond)
|
.set_delay(in_ch, 1.5, types::DelayUnit::Millisecond)
|
||||||
.expect("set_channel_delay");
|
.expect("set_delay");
|
||||||
assert!(ok);
|
assert!(ok);
|
||||||
|
|
||||||
let ok = dsp
|
let ok = dsp
|
||||||
@@ -2158,7 +2157,7 @@ fn full_command_sweep_against_real_hardware() {
|
|||||||
.expect("set_channel_name");
|
.expect("set_channel_name");
|
||||||
assert!(ok);
|
assert!(ok);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
dsp.state().unwrap().current_config.input_states[&input].name,
|
dsp.state().current_config.input_states[&input].name,
|
||||||
"Test InA"
|
"Test InA"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -2231,7 +2230,7 @@ fn full_command_sweep_against_real_hardware() {
|
|||||||
.expect("set_matrix_routing");
|
.expect("set_matrix_routing");
|
||||||
assert!(ok);
|
assert!(ok);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
dsp.state().unwrap().current_config.output_states[&output]
|
dsp.state().current_config.output_states[&output]
|
||||||
.matrix_routes
|
.matrix_routes
|
||||||
.connected,
|
.connected,
|
||||||
vec![input]
|
vec![input]
|
||||||
@@ -2273,11 +2272,11 @@ fn full_command_sweep_against_real_hardware() {
|
|||||||
.store_current_configuration(1, false)
|
.store_current_configuration(1, false)
|
||||||
.expect("store_current_configuration");
|
.expect("store_current_configuration");
|
||||||
assert!(ok);
|
assert!(ok);
|
||||||
assert!(dsp.state().unwrap().presets.modified[1]);
|
assert!(dsp.state().presets.modified[1]);
|
||||||
|
|
||||||
let ok = dsp.recall_preset(1).expect("recall_preset");
|
let ok = dsp.recall_preset(1).expect("recall_preset");
|
||||||
assert!(ok);
|
assert!(ok);
|
||||||
assert_eq!(dsp.state().unwrap().presets.current_index, 1);
|
assert_eq!(dsp.state().presets.current_index, 1);
|
||||||
|
|
||||||
// factory_reset intentionally left commented out — wipes the unit.
|
// factory_reset intentionally left commented out — wipes the unit.
|
||||||
// let ok = dsp.factory_reset(true).expect("factory_reset");
|
// let ok = dsp.factory_reset(true).expect("factory_reset");
|
||||||
@@ -2287,6 +2286,6 @@ fn full_command_sweep_against_real_hardware() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ---------- Disconnect ----------
|
// ---------- Disconnect ----------
|
||||||
dsp.disconnect();
|
assert!(dsp.disconnect().is_ok());
|
||||||
assert!(!dsp.connected(), "device should report disconnected");
|
assert!(!dsp.connected(), "device should report disconnected");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user