use std::panic::{RefUnwindSafe, UnwindSafe};
use rxls::{
Cell, CsvOptions, Error, FormulaEvaluation, FormulaRange, Range, ReportEvaluation,
ReportFeatures, ReportProperties, ReportStats, Sheet, Workbook, WorkbookReport,
};
fn assert_send_sync_static<T: Send + Sync + 'static>() {}
fn assert_unwind_safe<T: UnwindSafe + RefUnwindSafe>() {}
fn assert_std_error<T: std::error::Error + Send + Sync + 'static>() {}
#[test]
fn owned_core_and_output_types_are_send_sync() {
assert_send_sync_static::<Cell>();
assert_send_sync_static::<Sheet>();
assert_send_sync_static::<Workbook>();
assert_send_sync_static::<WorkbookReport>();
assert_send_sync_static::<ReportEvaluation>();
assert_send_sync_static::<CsvOptions>();
assert_send_sync_static::<FormulaEvaluation>();
assert_std_error::<Error>();
#[cfg(feature = "xlsx")]
{
assert_send_sync_static::<rxls::Spreadsheet>();
assert_std_error::<rxls::WriteError>();
}
}
#[test]
fn immutable_core_views_are_send_sync_and_unwind_safe() {
assert_send_sync_static::<Range<'static>>();
assert_send_sync_static::<FormulaRange<'static>>();
assert_unwind_safe::<Workbook>();
assert_unwind_safe::<Range<'static>>();
}
#[test]
fn public_return_types_are_nameable_from_the_crate_root() {
let _: Option<ReportStats> = None;
let _: Option<ReportProperties> = None;
let _: Option<ReportFeatures> = None;
let _: Option<rxls::RangeRowUsedCells<'static, 'static>> = None;
let _: Option<rxls::FormulaRangeRowUsedCells<'static, 'static>> = None;
let _ = rxls::CommentAuthor::from("reviewer");
}