diff --git a/tabled/Cargo.toml b/tabled/Cargo.toml index d385e956..c34ea2ff 100644 --- a/tabled/Cargo.toml +++ b/tabled/Cargo.toml @@ -324,7 +324,7 @@ ansitok = { version = "0.2", optional = true } [dev-dependencies] owo-colors = "3.5" -testing_table = { version = "0.1", features = ["ansi"] } +testing_table = { path = "../testing_table", features = ["ansi"] } # To run it locally (probably need to `add #![feature(doc_cfg)]` to the crate attributes to enable. # diff --git a/tabled/tests/settings/alignment_test.rs b/tabled/tests/settings/alignment_test.rs index 5bb080cb..0fa168b5 100644 --- a/tabled/tests/settings/alignment_test.rs +++ b/tabled/tests/settings/alignment_test.rs @@ -128,8 +128,8 @@ test_table!( padding_by_column_name_not_existing, Matrix::new(3, 3) .with(Style::psql()) - .with(Modify::new(ByColumnName::new("column 01123123")).with(Padding::new(3, 3, 0, 0))) - .with(Modify::new(Segment::all()).with(Alignment::center())), + .modify(ByColumnName::new("column 01123123"), Padding::new(3, 3, 0, 0)) + .with(Alignment::center()), " N | column 0 | column 1 | column 2 " "---+----------+----------+----------" " 0 | 0-0 | 0-1 | 0-2 " diff --git a/testing_table/src/macros.rs b/testing_table/src/macros.rs index 2862eca7..3c0ceb9b 100644 --- a/testing_table/src/macros.rs +++ b/testing_table/src/macros.rs @@ -66,7 +66,14 @@ macro_rules! test_table { macro_rules! assert_table { ($table:expr, $($line:expr)*) => { let table = $table.to_string(); - assert_eq!(table, $crate::static_table!($($line)*)); + let expected = $crate::static_table!($($line)*); + assert_eq!( + table, + expected, + "\ngot:\n{}\nexpected:\n{}", + table, + expected, + ); }; }