Writing and Running Tests - Rust Programming Tutorial #41

preview_player
Показать описание
Testing is relatively straightforward in Rust - it can be done using the 'cargo test' command. Once you have defined some tests in your source code, you are then able to run 'cargo test' to get your test results.

In this video I go over some basic examples of testing, how to use other modules + structs in your tests and some testing attributes.

For your reference, check this out:

Follow me on Twitter @dcode!

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
Рекомендации по теме
Комментарии
Автор

Nice tutorial mate! Just starting with rust and it was a very good introduction series. Thank you a lot.

philcrom
Автор

Thanks for the tutorials. I hope you would consider to do some videos about GUI interfaces for RUST, for example GTK.

xRicardo
Автор

Great video. Quick and to the point. Also appreciate the new spelling of 'square'. Aussie spelling?

musicarroll
Автор

that's kinda funny that you have to write panic with an exclamation point

pawekoaczynski
Автор

Good and clear tutorials !
But... "is_sqaure()" is kind of perturbing ._.

youlac
Автор

Why "assert_eq!(A, B)"?
Is it different from "assert!(A == B)"?

eddiegerbais-nief