You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 15, 2024. It is now read-only.
In main.rs, add a unit test for the cargo_dir function that checks that it panics if we have specified a new crate in the Cargo.toml file but have not yet run any command that would fetch that crate's source to our local filesystem.
Use the existing test marked should_panic for an example of how to make a test check that a function panics.
I doubt that this test will pass currently! Eventually, I'd like this to panic with a message like "Cannot open crate whatever because it is not a dependency of the current project`" or similar.
The text was updated successfully, but these errors were encountered:
In
main.rs
, add a unit test for thecargo_dir
function that checks that it panics if we have specified a new crate in theCargo.toml
file but have not yet run any command that would fetch that crate's source to our local filesystem.Use the existing test marked
should_panic
for an example of how to make a test check that a function panics.I doubt that this test will pass currently! Eventually, I'd like this to panic with a message like "Cannot open crate
whatever
because it is not a dependency of the current project`" or similar.The text was updated successfully, but these errors were encountered: