]> git.proxmox.com Git - rustc.git/blame - src/etc/test-float-parse/long-fractions.rs
New upstream version 1.42.0+dfsg1
[rustc.git] / src / etc / test-float-parse / long-fractions.rs
CommitLineData
7453a54e 1mod _common;
223e47cc 2
7453a54e 3use _common::validate;
dfeec247 4use std::char;
85aaf69f 5
223e47cc 6fn main() {
7453a54e
SL
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 }
970d7e83 16 }
223e47cc 17}