macro_rules! static_table {
($($line:expr)*) => { ... };
}
Expand description
Construct a static table.
Usefull for assert functions.
§Example
use tabled::Table;
use tabled::assert::static_table;
let data = [[1, 2, 3], [4, 5, 6]];
let table = Table::new(data);
assert_eq!(
table.to_string(),
static_table!(
"+---+---+---+"
"| 0 | 1 | 2 |"
"+---+---+---+"
"| 1 | 2 | 3 |"
"+---+---+---+"
"| 4 | 5 | 6 |"
"+---+---+---+"
),
);
Build a static table.
§Example
static_table!(
"|--|--|"
"|XX|XY|"
"|--|--|"
)