1
use ron::{de::*, ser::*};
2

            
3
#[test]
4
4
fn test_i32_min() {
5
4
    assert_eq!(
6
4
        std::i32::MIN,
7
4
        from_str(&to_string(&std::i32::MIN).unwrap()).unwrap()
8
4
    );
9
4
}
10

            
11
#[test]
12
4
fn test_i32_max() {
13
4
    assert_eq!(
14
4
        std::i32::MAX,
15
4
        from_str(&to_string(&std::i32::MAX).unwrap()).unwrap()
16
4
    );
17
4
}
18

            
19
#[test]
20
4
fn test_i64_min() {
21
4
    assert_eq!(
22
4
        std::i64::MIN,
23
4
        from_str(&to_string(&std::i64::MIN).unwrap()).unwrap()
24
4
    );
25
4
}
26

            
27
#[test]
28
4
fn test_i64_max() {
29
4
    assert_eq!(
30
4
        std::i64::MAX,
31
4
        from_str(&to_string(&std::i64::MAX).unwrap()).unwrap()
32
4
    );
33
4
}
34

            
35
#[cfg(feature = "integer128")]
36
#[test]
37
2
fn test_i128_min() {
38
2
    assert_eq!(
39
2
        std::i128::MIN,
40
2
        from_str(&to_string(&std::i128::MIN).unwrap()).unwrap()
41
2
    );
42
2
}
43

            
44
#[cfg(feature = "integer128")]
45
#[test]
46
2
fn test_i128_max() {
47
2
    assert_eq!(
48
2
        std::i128::MAX,
49
2
        from_str(&to_string(&std::i128::MAX).unwrap()).unwrap()
50
2
    );
51
2
}
52

            
53
#[cfg(feature = "integer128")]
54
#[test]
55
2
fn test_u128_min() {
56
2
    assert_eq!(
57
2
        std::u128::MIN,
58
2
        from_str(&to_string(&std::u128::MIN).unwrap()).unwrap()
59
2
    );
60
2
}
61

            
62
#[cfg(feature = "integer128")]
63
#[test]
64
2
fn test_u128_max() {
65
2
    assert_eq!(
66
2
        std::u128::MAX,
67
2
        from_str(&to_string(&std::u128::MAX).unwrap()).unwrap()
68
2
    );
69
2
}