Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #77 from dtolnay/literals
Browse files Browse the repository at this point in the history
Add test of char, string, and raw string literals
  • Loading branch information
dtolnay authored Mar 27, 2022
2 parents d563004 + fccf35a commit 9b5ae9d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/test_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,20 @@ fn test_repeat() {
}

#[test]
fn test_integer() {
fn test_literals() {
const CONST0: &str = "const0";

let pasted = paste!([<CONST 0>]);
assert_eq!(pasted, CONST0);

let pasted = paste!([<CONST '0'>]);
assert_eq!(pasted, CONST0);

let pasted = paste!([<CONST "0">]);
assert_eq!(pasted, CONST0);

let pasted = paste!([<CONST r"0">]);
assert_eq!(pasted, CONST0);
}

#[test]
Expand Down

0 comments on commit 9b5ae9d

Please sign in to comment.