FIX: Adds tests
This commit is contained in:
@@ -38,6 +38,7 @@ mod test_sheet_markup;
|
|||||||
mod test_sheets;
|
mod test_sheets;
|
||||||
mod test_styles;
|
mod test_styles;
|
||||||
mod test_trigonometric;
|
mod test_trigonometric;
|
||||||
|
mod test_workbook;
|
||||||
mod test_worksheet;
|
mod test_worksheet;
|
||||||
pub(crate) mod util;
|
pub(crate) mod util;
|
||||||
|
|
||||||
@@ -47,6 +48,7 @@ mod test_number_format;
|
|||||||
|
|
||||||
mod test_escape_quotes;
|
mod test_escape_quotes;
|
||||||
mod test_fn_type;
|
mod test_fn_type;
|
||||||
|
mod test_frozen_rows_and_columns;
|
||||||
mod test_get_cell_content;
|
mod test_get_cell_content;
|
||||||
mod test_percentage;
|
mod test_percentage;
|
||||||
mod test_today;
|
mod test_today;
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
#![allow(clippy::unwrap_used)]
|
#![allow(clippy::unwrap_used)]
|
||||||
|
|
||||||
use crate::expressions::utils::{LAST_COLUMN, LAST_ROW};
|
use crate::{
|
||||||
use crate::test::util::new_empty_model;
|
constants::{LAST_COLUMN, LAST_ROW},
|
||||||
|
test::util::new_empty_model,
|
||||||
|
};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_empty_model() {
|
fn test_empty_model() {
|
||||||
|
|||||||
18
base/src/test/test_workbook.rs
Normal file
18
base/src/test/test_workbook.rs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#![allow(clippy::unwrap_used)]
|
||||||
|
|
||||||
|
use crate::{test::util::new_empty_model, types::SheetInfo};
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn workbook_worksheets_info() {
|
||||||
|
let model = new_empty_model();
|
||||||
|
let sheets_info = model.workbook.get_worksheets_info();
|
||||||
|
assert_eq!(
|
||||||
|
sheets_info[0],
|
||||||
|
SheetInfo {
|
||||||
|
name: "Sheet1".to_string(),
|
||||||
|
state: "visible".to_string(),
|
||||||
|
sheet_id: 1,
|
||||||
|
color: None
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user