testing_table

Crates.iotesting_table
lib.rstesting_table
version0.3.0
created_at2024-08-05 20:47:04.47863+00
updated_at2025-04-24 20:50:49.558936+00
descriptionAn easy to use library for pretty print tables of Rust `struct`s and `enum`s.
homepagehttps://github.com/zhiburt/tabled
repositoryhttps://github.com/zhiburt/tabled
max_upload_size
id1326506
size9,972
Maxim Zhiburt (zhiburt)

documentation

https://docs.rs/testing_table

README

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 |"
    "+---+---+---+"
);
Commit count: 1554

cargo fmt