// Since all of the uses of this module are generated, dead code resolution doesn't work. #![allow(dead_code)] pub mod client; pub mod connector; use super::{TestDeviceIdentifier, TestHardwareEvent}; use buttplug::{ core::message::{ RotationSubcommandV1, ScalarSubcommandV3, VectorSubcommandV1, VibrateSubcommandV1, }, server::device::hardware::HardwareCommand, }; use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize)] struct TestDevice { identifier: TestDeviceIdentifier, expected_name: Option, expected_display_name: Option, } #[derive(Serialize, Deserialize)] enum TestCommand { Messages { device_index: u32, messages: Vec, }, Commands { device_index: u32, commands: Vec, }, Events { device_index: u32, events: Vec, }, } #[derive(Serialize, Deserialize, Debug)] enum TestClientCommand { Scalar(Vec), Vibrate(Vec), Rotate(Vec), Linear(Vec), Battery { expected_power: f64, run_async: bool, }, Stop, RSSI, } #[derive(Serialize, Deserialize)] pub struct DeviceTestCase { devices: Vec, device_config_file: Option, user_device_config_file: Option, device_init: Option>, device_commands: Vec, }