Skip to content

Should shift int/uint tests around to avoid code repetition #22535

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

Closed
pnkfelix opened this issue Feb 19, 2015 · 1 comment
Closed

Should shift int/uint tests around to avoid code repetition #22535

pnkfelix opened this issue Feb 19, 2015 · 1 comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@pnkfelix
Copy link
Member

Currently within

macro_rules! uint_module { ($T:ty) => (

we have, after things that do use $T, the pair of tests:

#[test]
fn test_uint_to_str_overflow() { ... }
 #[test]
fn test_uint_from_str_overflow() { ... }

that do not reference $T.

As far as I can tell, these tests do not need to be inside the macro definition. They should live outside it, so that we will not generate code for them and redundantly run them once for every integer type variant.

@pnkfelix pnkfelix added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-testsuite Area: The testsuite used to check the correctness of rustc labels Feb 19, 2015
bombless added a commit to bombless/rust that referenced this issue Feb 23, 2015
Manishearth added a commit to Manishearth/rust that referenced this issue Feb 23, 2015
@alexcrichton
Copy link
Member

Fixed in #22658

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants