Skip to content

jamesodhunt/rust-unit-tests-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Simple rust program with some unit tests

Run the program

Run program with a valid number

$ cargo run -- 123

Run program with some invalid input

$ cargo run -- foo
$ cargo run -- ' '
$ cargo run -- 256

Run the tests

Run tests in default terse mode

$ cargo test

Run tests in verbose mode

$ DEBUG=1 cargo test -vv -- --nocapture 

See also

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages