add basic property test for decimal parser

korrat
Oct 2, 2022, 2:23 PM
7VFBUJ6PUVTH4AXIYZFIJOG4VJXXVGR2CNFOUVPTC5QB4FGQNBRQC

Dependencies

  • [2] I2P2FTLE add basic parser for german decimals

Change contents

  • file addition: properties (d--r------)
    [2.65]
  • file addition: main.rs (---r------)
    [0.22]
    use proptest::prop_assert;
    use proptest::proptest;
    proptest! {
    #[test]
    fn can_parse_arbitrary_localized_decimal(decimal in r"(-|\+)?[0-9]{1,3}(\.[0-9]{3}){0,3}(,[0-9]{10})?") {
    let result = german_decimal::parse(&decimal);
    if let Err(message) = result {
    eprintln!("{message}");
    prop_assert!(false);
    }
    }
    }