mirror of
https://gitee.com/openharmony/third_party_rust_quote
synced 2024-11-23 15:19:40 +00:00
Add test involving non-builtin literal suffix
Currently fails: error: invalid width `256` for integer literal --> tests/test.rs:179:16 | 179 | 1 1i32 1u256 | ^^^^^ | = help: valid widths are 8, 16, 32, 64 and 128
This commit is contained in:
parent
917d940933
commit
b8b6e4201b
@ -176,10 +176,11 @@ fn test_integer() {
|
||||
let uusize = 1usize;
|
||||
|
||||
let tokens = quote! {
|
||||
1 1i32 1u256
|
||||
#ii8 #ii16 #ii32 #ii64 #ii128 #iisize
|
||||
#uu8 #uu16 #uu32 #uu64 #uu128 #uusize
|
||||
};
|
||||
let expected = "- 1i8 - 1i16 - 1i32 - 1i64 - 1i128 - 1isize 1u8 1u16 1u32 1u64 1u128 1usize";
|
||||
let expected = "1 1i32 1u256 - 1i8 - 1i16 - 1i32 - 1i64 - 1i128 - 1isize 1u8 1u16 1u32 1u64 1u128 1usize";
|
||||
assert_eq!(expected, tokens.to_string());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user