Skip to content

fix: Better test for exercises/10_modules/modules1.rs#2369

Open
JiwaniZakir wants to merge 2 commits intorust-lang:mainfrom
JiwaniZakir:better-test-exercises-10_modules-2339
Open

fix: Better test for exercises/10_modules/modules1.rs#2369
JiwaniZakir wants to merge 2 commits intorust-lang:mainfrom
JiwaniZakir:better-test-exercises-10_modules-2339

Conversation

@JiwaniZakir
Copy link

Fixes #2339

The modules1 exercise could be passed by commenting out the call in main, since no test enforced that make_sausage() must be public. Adds a #[cfg(test)] block to exercises/10_modules/modules1.rs that calls sausage_factory::make_sausage() directly, and sets test = true in rustlings-macros/info.toml so rustlings actually runs cargo test against the exercise.

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.

Better test for exercises/10_modules/modules1.rs

1 participant