Sign in
android
/
toolchain
/
rustc
/
15a6560abe9880705f51d219c1fa94f880dbaf35
/
.
/
src
/
doc
/
book
/
listings
/
ch11-writing-automated-tests
/
no-listing-10-result-in-tests
/
src
/
lib.rs
blob: 6284f4f291520a12a70442b10f29dda662ff35e1 [
file
] [
log
] [
blame
]
#[
cfg
(
test
)]
mod
tests
{
#[
test
]
fn
it_works
()
->
Result
<(),
String
>
{
if
2
+
2
==
4
{
Ok
(())
}
else
{
Err
(
String
::
from
(
"two plus two does not equal four"
))
}
}
}