Skip to content

Commit

Permalink
Add visibility to test struct to test compilation and correct macro e…
Browse files Browse the repository at this point in the history
…xpansion
  • Loading branch information
nikessel committed May 26, 2024
1 parent 61853b7 commit 3311408
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ fn test_unit_struct() {

/// A struct with fields.
#[derive(new, PartialEq, Debug)]
#[new(visibility = "pub(crate)")]
pub struct Bar {
pub x: i32,
pub y: String,
Expand Down Expand Up @@ -170,7 +171,6 @@ fn test_struct_with_defaults() {
pub z: T,
}


let x = Waldo::<Vec<String>>::new(42);
assert_eq!(
x,
Expand Down Expand Up @@ -227,7 +227,6 @@ fn test_struct_mixed_defaults() {
);
}


#[cfg(feature = "std")]
#[test]
fn test_struct_phantom_data() {
Expand Down Expand Up @@ -326,8 +325,8 @@ fn test_enum_unit_variants() {
#[cfg(feature = "std")]
#[test]
fn test_more_involved_enum() {
use std::marker::PhantomData;
use std::default::Default;
use std::marker::PhantomData;

/// A more involved enum
#[derive(new, PartialEq, Debug)]
Expand Down

0 comments on commit 3311408

Please sign in to comment.