2 ms·
> I'm not actually clear what he means by 'test' to be honest, but I assume he means 'a single test function that can either pass or fail' I assume so as well.
by cbarrick 2y ago
> I'm not actually clear what he means by 'test' to be honest, but I assume he means 'a single test function that can either pass or fail'
I assume so as well.
Unit testing in Rust is based around functions annotated with #[test], so it's safe to assume that when the author says "test" they are referring to one such function.
It's up to the user to decide what they do in each function. For example, you could do a Go-style table-driven test, but the entire function would be a single "test", _not_ one "test" per table entry.