use super::*; use crate::col_range; #[test] fn write_col_info01() -> Result<()> { let expected = ""; let column = Column { range: col_range(1, 3)?, options: Default::default(), width: 5f64, format_index: None, }; assert_eq!(column.write_xml_to_string()?.as_str(), expected); Ok(()) } #[test] fn write_col_info02() -> Result<()> { let expected = ""; let column = Column { range: col_range(5, 5)?, options: Some(RowColOptions { level: Default::default(), hidden: true, collapsed: false, }), width: 8f64, format_index: None, }; assert_eq!(column.write_xml_to_string()?.as_str(), expected); Ok(()) } #[test] fn write_col_info03() -> Result<()> { let expected = ""; let column = Column { range: col_range(7, 7)?, options: Some(RowColOptions { level: Default::default(), hidden: false, collapsed: false, }), width: DEFAULT_COL_WIDTH, format_index: Some(1usize), }; assert_eq!(column.write_xml_to_string()?.as_str(), expected); Ok(()) } #[test] fn write_col_info04() -> Result<()> { let expected = ""; let column = Column { range: col_range(8, 8)?, options: Some(RowColOptions { level: Default::default(), hidden: false, collapsed: false, }), width: DEFAULT_COL_WIDTH, format_index: Some(1usize), }; assert_eq!(column.write_xml_to_string()?.as_str(), expected); Ok(()) } #[test] fn write_col_info05() -> Result<()> { let expected = ""; let column = Column { range: col_range(9, 9)?, options: Some(RowColOptions { level: Default::default(), hidden: false, collapsed: false, }), width: 2f64, format_index: None, }; assert_eq!(column.write_xml_to_string()?.as_str(), expected); Ok(()) } #[test] fn write_col_info06() -> Result<()> { let expected = ""; let column = Column { range: col_range(11, 11)?, options: Some(RowColOptions { level: Default::default(), hidden: true, collapsed: false, }), width: DEFAULT_COL_WIDTH, format_index: None, }; assert_eq!(column.write_xml_to_string()?.as_str(), expected); Ok(()) }