4 releases (2 breaking)
new 0.3.0 | Apr 24, 2025 |
---|---|
0.2.0 | Nov 22, 2024 |
0.1.1 | Aug 5, 2024 |
0.1.0 | Aug 5, 2024 |
#556 in Testing
929 downloads per month
Used in 9 crates
(2 directly)
8KB
91 lines
Crate provides a convinient functions for work with tables.
use testing_table::test_table;
test_table!(
test_tabled,
tabled::Table::new([[1, 2, 3]]),
"+---+---+---+"
"| 0 | 1 | 2 |"
"+---+---+---+"
"| 1 | 2 | 3 |"
"+---+---+---+"
);
use testing_table::assert_table;
assert_table!(
tabled::Table::new([[1, 2, 3]]),
"+---+---+---+"
"| 0 | 1 | 2 |"
"+---+---+---+"
"| 1 | 2 | 3 |"
"+---+---+---+"
);
use testing_table::static_table;
static_table!(
"+---+---+---+"
"| 0 | 1 | 2 |"
"+---+---+---+"
"| 1 | 2 | 3 |"
"+---+---+---+"
);
It was developed as a sub-project of tabled
.
testing_table
A library which provides handy macros for table testing.
Includes
test_table!
static_table!
assert_table!
assert_width!
use testing_table::{test_table, assert_table, static_table};
test_table!(
test_tabled,
tabled::Table::new([[1, 2, 3]]),
"+---+---+---+"
"| 0 | 1 | 2 |"
"+---+---+---+"
"| 1 | 2 | 3 |"
"+---+---+---+"
);
assert_table!(
tabled::Table::new([[1, 2, 3]]),
"+---+---+---+"
"| 0 | 1 | 2 |"
"+---+---+---+"
"| 1 | 2 | 3 |"
"+---+---+---+"
);
static_table!(
"+---+---+---+"
"| 0 | 1 | 2 |"
"+---+---+---+"
"| 1 | 2 | 3 |"
"+---+---+---+"
);
Dependencies
~1.5MB
~25K SLoC