Skip to content

sophie-lund/test-ur-code-XD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

test ur code XD :3

documentation

This crate tries to improve testing in Rust with a more full-featured framework. It makes tests more readable with better assertions and with more readable errors:

A screenshot of an assertion

A screenshot of an string diff

Usage

Read the user guide for instructions on how to use this crate in your own projects.

See docs.rs for the API documentation and crates.io to install.

Features

More assertions

  • Floating-point assertions
  • String assertions
  • Panic assertions
  • Output assertions for stdout and stderr
  • Filesystem assertions

See the user guide for a full list of assertion macros you can use.

Parameterized tests

#[test_with_parameter_values(
    x = [5, 6, 7],
    y = [1, 2])
]
fn example(x: i32, y: i32) {
    // This will permute the values and automatically run all of these cases:
    //   x == 5, y == 1
    //   x == 5, y == 2
    //   x == 6, y == 1
    //   x == 6, y == 2
    //   x == 7, y == 1
    //   x == 7, y == 2
}

Contributing

See the contributing guide.


This project uses rust-vscode-template, which has instructions on how to use it.

Releases

No releases published

Packages

No packages published

Languages