| 1 | use lexical_utilrust-analyzer cargo lexical-util 1.0.7 crate/::formatrust-analyzer cargo lexical-util 1.0.7 format/::{NumberFormatrust-analyzer cargo lexical-util 1.0.7 feature_format/NumberFormat#, NumberFormatBuilderrust-analyzer cargo lexical-util 1.0.7 format_builder/NumberFormatBuilder#}; |
| 2 | |
| 3 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 4 | fn decimal_testrust-analyzer cargo lexical-util 1.0.7 decimal_test().() { |
| 5 | const FORMATrust-analyzer cargo lexical-util 1.0.7 FORMAT.: u128 = NumberFormatBuilderrust-analyzer cargo lexical-util 1.0.7 format_builder/NumberFormatBuilder#::decimalrust-analyzer cargo lexical-util 1.0.7 format_builder/impl#[NumberFormatBuilder]decimal().(); |
| 6 | let format = NumberFormatrust-analyzer cargo lexical-util 1.0.7 feature_format/NumberFormat#::<FORMATrust-analyzer cargo lexical-util 1.0.7 FORMAT.> {}; |
| 7 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(format.is_validrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]is_valid().()); |
| 8 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.radixrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]radix().(), 10); |
| 9 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.mantissa_radixrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]mantissa_radix().(), 10); |
| 10 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.exponent_baserust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]exponent_base().(), 10); |
| 11 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.exponent_radixrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]exponent_radix().(), 10); |
| 12 | } |
| 13 | |
| 14 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 15 | #[cfg(feature = "power-of-two")] |
| 16 | fn binary_testrust-analyzer cargo lexical-util 1.0.7 binary_test().() { |
| 17 | const FORMATrust-analyzer cargo lexical-util 1.0.7 FORMAT.: u128 = NumberFormatBuilderrust-analyzer cargo lexical-util 1.0.7 format_builder/NumberFormatBuilder#::binaryrust-analyzer cargo lexical-util 1.0.7 format_builder/impl#[NumberFormatBuilder]binary().(); |
| 18 | let format = NumberFormatrust-analyzer cargo lexical-util 1.0.7 feature_format/NumberFormat#::<FORMATrust-analyzer cargo lexical-util 1.0.7 FORMAT.> {}; |
| 19 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(format.is_validrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]is_valid().()); |
| 20 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.radixrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]radix().(), 2); |
| 21 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.mantissa_radixrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]mantissa_radix().(), 2); |
| 22 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.exponent_baserust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]exponent_base().(), 2); |
| 23 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.exponent_radixrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]exponent_radix().(), 2); |
| 24 | } |
| 25 | |
| 26 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 27 | #[cfg(feature = "power-of-two")] |
| 28 | fn octal_testrust-analyzer cargo lexical-util 1.0.7 octal_test().() { |
| 29 | const FORMATrust-analyzer cargo lexical-util 1.0.7 FORMAT.: u128 = NumberFormatBuilderrust-analyzer cargo lexical-util 1.0.7 format_builder/NumberFormatBuilder#::octalrust-analyzer cargo lexical-util 1.0.7 format_builder/impl#[NumberFormatBuilder]octal().(); |
| 30 | let format = NumberFormatrust-analyzer cargo lexical-util 1.0.7 feature_format/NumberFormat#::<FORMATrust-analyzer cargo lexical-util 1.0.7 FORMAT.> {}; |
| 31 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(format.is_validrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]is_valid().()); |
| 32 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.radixrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]radix().(), 8); |
| 33 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.mantissa_radixrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]mantissa_radix().(), 8); |
| 34 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.exponent_baserust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]exponent_base().(), 8); |
| 35 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.exponent_radixrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]exponent_radix().(), 8); |
| 36 | } |
| 37 | |
| 38 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 39 | #[cfg(feature = "power-of-two")] |
| 40 | fn hexadecimal_testrust-analyzer cargo lexical-util 1.0.7 hexadecimal_test().() { |
| 41 | const FORMATrust-analyzer cargo lexical-util 1.0.7 FORMAT.: u128 = NumberFormatBuilderrust-analyzer cargo lexical-util 1.0.7 format_builder/NumberFormatBuilder#::hexadecimalrust-analyzer cargo lexical-util 1.0.7 format_builder/impl#[NumberFormatBuilder]hexadecimal().(); |
| 42 | let format = NumberFormatrust-analyzer cargo lexical-util 1.0.7 feature_format/NumberFormat#::<FORMATrust-analyzer cargo lexical-util 1.0.7 FORMAT.> {}; |
| 43 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(format.is_validrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]is_valid().()); |
| 44 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.radixrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]radix().(), 16); |
| 45 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.mantissa_radixrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]mantissa_radix().(), 16); |
| 46 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.exponent_baserust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]exponent_base().(), 16); |
| 47 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.exponent_radixrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]exponent_radix().(), 16); |
| 48 | } |
| 49 | |
| 50 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 51 | #[cfg(feature = "power-of-two")] |
| 52 | fn from_radix_testrust-analyzer cargo lexical-util 1.0.7 from_radix_test().() { |
| 53 | const FORMATrust-analyzer cargo lexical-util 1.0.7 FORMAT.: u128 = NumberFormatBuilderrust-analyzer cargo lexical-util 1.0.7 format_builder/NumberFormatBuilder#::from_radixrust-analyzer cargo lexical-util 1.0.7 format_builder/impl#[NumberFormatBuilder]from_radix().(32); |
| 54 | let format = NumberFormatrust-analyzer cargo lexical-util 1.0.7 feature_format/NumberFormat#::<FORMATrust-analyzer cargo lexical-util 1.0.7 FORMAT.> {}; |
| 55 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(format.is_validrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]is_valid().()); |
| 56 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.radixrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]radix().(), 32); |
| 57 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.mantissa_radixrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]mantissa_radix().(), 32); |
| 58 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.exponent_baserust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]exponent_base().(), 32); |
| 59 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(format.exponent_radixrust-analyzer cargo lexical-util 1.0.7 feature_format/impl#[`NumberFormat<FORMAT>`]exponent_radix().(), 32); |
| 60 | } |