Skip to content

Commit

Permalink
Merge pull request #1 from shenxiang11/master
Browse files Browse the repository at this point in the history
issues: add 2 fixme problems
  • Loading branch information
tyrchen authored Nov 24, 2024
2 parents c314e0d + 752d8bb commit ba872bd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ mod tests {
let result = parse_num(&mut (&*input))?;
assert_eq!(result, Num::Float(-123.456));

// FIXME: doesn't work it the digital starts with 0
let input = "123.0001";
let result = parse_num(&mut (&*input))?;
assert_eq!(result, Num::Float(123.0001));

Ok(())
}

Expand Down Expand Up @@ -235,6 +240,12 @@ mod tests {
);
assert_eq!(result, expected);

// FIXME: doesn't work with empty object
let input = r#"{}"#;
let result = parse_object(&mut (&*input))?;
let expected = HashMap::new();
assert_eq!(result, expected);

Ok(())
}
}

0 comments on commit ba872bd

Please sign in to comment.