Assert! message best pratices?

⚓ rust    📅 2025-04-25    👤 surdeus    👁️ 3      

surdeus

Hi,

I am creating integration tests.
I realize that we can pass a message with assert! like this for example :

const MY_CUSTOM_ERROR :&str = "Error occurs when...";
assert!(false, "{}", MY_CUSTOM_ERROR);

But I wonder if you have eventually best pratices when using assert! message ?

Have a nice day !

3 posts - 2 participants

Read full topic

🏷️ rust_feed