Skip to content

Commit

Permalink
Add tests for lint attrs propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
aldanor committed Mar 12, 2017
1 parent da85fbf commit 160dffb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![deny(non_snake_case)]

#[macro_use]
extern crate derive_new;

Expand Down Expand Up @@ -275,3 +277,11 @@ fn test_more_involved_enum() {
let x = Enterprise::<u8>::new_spock(42);
assert_eq!(x, Enterprise::Spock { x: PhantomData, y: 42 });
}

#[allow(non_snake_case)]
#[derive(new, PartialEq, Debug)]
pub struct Upside { X: i32 }

#[cfg_attr(test, allow(non_snake_case))]
#[derive(new, PartialEq, Debug)]
pub struct Down { X: i32 }

0 comments on commit 160dffb

Please sign in to comment.