]> git.lizzy.rs Git - rust.git/blob - src/etc/test-float-parse/long-fractions.rs
Rollup merge of #69050 - nnethercote:micro-optimize-leb128, r=michaelwoerister
[rust.git] / src / etc / test-float-parse / long-fractions.rs
1 mod _common;
2
3 use _common::validate;
4 use std::char;
5
6 fn main() {
7     for n in 0..10 {
8         let digit = char::from_digit(n, 10).unwrap();
9         let mut s = "0.".to_string();
10         for _ in 0..400 {
11             s.push(digit);
12             if s.parse::<f64>().is_ok() {
13                 validate(&s);
14             }
15         }
16     }
17 }