Test integer128 impls
This commit is contained in:
parent
c17bc6c49c
commit
9083cf4b00
@ -259,6 +259,27 @@ declare_tests! {
|
||||
0f32 => &[Token::F32(0.)],
|
||||
0f64 => &[Token::F64(0.)],
|
||||
}
|
||||
test_small_int_to_128 {
|
||||
1i128 => &[Token::I8(1)],
|
||||
1i128 => &[Token::I16(1)],
|
||||
1i128 => &[Token::I32(1)],
|
||||
1i128 => &[Token::I64(1)],
|
||||
|
||||
1i128 => &[Token::U8(1)],
|
||||
1i128 => &[Token::U16(1)],
|
||||
1i128 => &[Token::U32(1)],
|
||||
1i128 => &[Token::U64(1)],
|
||||
|
||||
1u128 => &[Token::I8(1)],
|
||||
1u128 => &[Token::I16(1)],
|
||||
1u128 => &[Token::I32(1)],
|
||||
1u128 => &[Token::I64(1)],
|
||||
|
||||
1u128 => &[Token::U8(1)],
|
||||
1u128 => &[Token::U16(1)],
|
||||
1u128 => &[Token::U32(1)],
|
||||
1u128 => &[Token::U64(1)],
|
||||
}
|
||||
test_char {
|
||||
'a' => &[Token::Char('a')],
|
||||
'a' => &[Token::Str("a")],
|
||||
|
@ -586,3 +586,10 @@ fn test_enum_skipped() {
|
||||
"the enum variant Enum::SkippedMap cannot be serialized",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_integer128() {
|
||||
assert_ser_tokens_error(&1i128, &[], "i128 is not supported");
|
||||
|
||||
assert_ser_tokens_error(&1u128, &[], "u128 is not supported");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user