Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephTLyons committed Nov 12, 2024
1 parent 3cff54e commit 432f393
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ float and integer values. This package offers more flexible parsing than the
standard Gleam functions, similar to Python's built-in `float()` and `int()`
functions.

- `float("3.14")` -> `"3.14" |> lenient_parse.to_float`
- `int("42")` -> `"42" |> lenient_parse.to_int`
- `int("1010", base=2)` -> `"1010" |> lenient_parse.to_int_with_base(base: 2)`

## Installation

```sh
Expand Down Expand Up @@ -86,16 +90,15 @@ pub fn main() {
}
```

## Rigorous Testing
## [Rigorous Testing](https://github.com/JosephTLyons/lenient_parse/tree/main/test/data)

`lenient_parse`'s [testing is
extensive](https://github.com/JosephTLyons/lenient_parse/tree/main/test/data).
Each test input is also processed using Python's (3.13) `float()` and `int()`
functions. We verify that `lenient_parse` produces the same output as Python. If
Python's built-ins succeed, `lenient_parse` should also succeed with identical
results. If Python's built-ins fail to parse, `lenient_parse` should also fail.
This ensures that `lenient_parse` behaves consistently with Python's built-ins
for all supplied test data.
`lenient_parse`'s testing is extensive. Each test input is also processed using
Python's (3.13) `float()` and `int()` functions. We verify that `lenient_parse`
produces the same output as Python. If Python's built-ins succeed,
`lenient_parse` should also succeed with identical results. If Python's
built-ins fail to parse, `lenient_parse` should also fail. This ensures that
`lenient_parse` behaves consistently with Python's built-ins for all supplied
test data.

## Development

Expand Down

0 comments on commit 432f393

Please sign in to comment.