Skip to content

Introduce a CrateBuilder for tests #745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 6, 2017

Conversation

shepmaster
Copy link
Member

No description provided.

In production, we don't allow the concept of a crate with zero
versions, so we should strive to adhere to that in tests as well.
@sgrif
Copy link
Contributor

sgrif commented Jun 3, 2017

I like this idea, but I don't think we need to call the build method expect_build. "panic if this fails" is generally assumed the default for tests.

@carols10cents
Copy link
Member

I could see a test wanting to just call build and do its own custom error handling for some reason. I'd be open to a pull request changing this though, if you feel super strongly about it @sgrif.

I really like this change though, I think it makes the tests lots clearer, and I'm going to merge it so we can start using the builder in more places.

@carols10cents carols10cents merged commit 878c082 into rust-lang:master Jun 6, 2017
@carols10cents carols10cents deleted the builder branch June 6, 2017 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants