Skip to content

Commit

Permalink
Extended braced macro invocation test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrimati1992 committed May 28, 2022
1 parent b740a57 commit 978e9ac
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions const_format/tests/misc_tests/shared_cp_macro_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,18 @@ fn other_tests() {
// https://github.com/rodrimati1992/const_format_crates/issues/36
#[test]
fn call_in_braced_macro() {
assert_eq!(
{
assert_eq!(
{
__identity! {concatcp!("a", "b")}
},
"ab"
);
{
__identity! {concatcp!("a", "b")}
},
"ab"
);
{
__identity! {concatcp!("a", "b")}
};
};
__identity! {concatcp!("a", "b")};
}

#[cfg(feature = "fmt")]
{
Expand All @@ -116,17 +119,21 @@ fn call_in_braced_macro() {
{
__identity! {concatc!("a", "b")}
};
__identity! {concatc!("a", "b")};
}

assert_eq!(
{
assert_eq!(
{
__identity! {formatcp!("ab")}
},
"ab"
);
{
__identity! {formatcp!("ab")}
},
"ab"
);
{
__identity! {formatcp!("ab")}
};
};
__identity! {formatcp!("ab")};
}

#[cfg(feature = "fmt")]
{
Expand All @@ -139,5 +146,6 @@ fn call_in_braced_macro() {
{
__identity! {formatc!("ab")}
};
__identity! {formatc!("ab")};
}
}

0 comments on commit 978e9ac

Please sign in to comment.