mod f64_serializer;
#[cfg(feature = "sync-sender-http")]
mod http;
#[cfg(any(feature = "sync-sender-tcp", feature = "sync-sender-http"))]
mod mock;
#[cfg(feature = "sync-sender-qwp-udp")]
mod qwp;
#[cfg(any(feature = "_sender-qwp-udp", feature = "_sender-qwp-ws"))]
pub(crate) mod qwp_decode;
#[cfg(feature = "sync-sender-qwp-udp")]
mod qwp_mock;
#[cfg(feature = "sync-sender-qwp-ws")]
mod qwp_ws;
#[cfg(all(feature = "sync-sender-qwp-ws", feature = "sync-sender-http"))]
mod qwp_ws_replay_probe;
#[cfg(all(feature = "sync-sender-qwp-ws", feature = "sync-sender-http"))]
mod qwp_ws_protocol_probe;
#[cfg(all(feature = "sync-sender-qwp-ws", feature = "sync-sender-http"))]
mod qwp_ws_publication_probe;
#[cfg(feature = "sync-sender-qwp-ws")]
mod qwp_ws_java_golden;
#[cfg(feature = "sync-sender-qwp-ws")]
mod qwp_sender_pool;
mod sender;
mod decimal;
mod ndarr;
mod buffer_opt;
#[cfg(feature = "json-tests")]
mod json_tests {
include!(concat!(env!("OUT_DIR"), "/json_tests.rs"));
}
pub type TestError = Box<dyn std::error::Error>;
pub type TestResult = std::result::Result<(), TestError>;
pub fn assert_err_contains<T: std::fmt::Debug>(
result: crate::Result<T>,
expected_code: crate::ErrorCode,
expected_msg_contained: &str,
) {
match result {
Ok(_) => {
panic!("Expected error containing '{expected_msg_contained}', but got Ok({result:?})")
}
Err(e) => {
assert_eq!(
e.code(),
expected_code,
"Expected error code {:?}, but got {:?}",
expected_code,
e.code()
);
assert!(
e.msg().contains(expected_msg_contained),
"Expected error message to contain {:?}, but got {:?}",
expected_msg_contained,
e.msg()
);
}
}
}