Skip to content

Commit

Permalink
Merge pull request #100 from apasel422/serialization-significant
Browse files Browse the repository at this point in the history
Add tests covering canonicalization of insignificant decimal digits
  • Loading branch information
mnot authored Feb 6, 2025
2 parents d2ec605 + 741abdf commit 88c3fc3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions number.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,26 @@
"raw": ["-1234567890123.0"],
"header_type": "item",
"must_fail": true
},
{
"name": "decimal with 1 significant digit and 1 insignificant digit",
"raw": ["1.20"],
"header_type": "item",
"expected": [1.2, []],
"canonical": ["1.2"]
},
{
"name": "decimal with 1 significant digit and 2 insignificant digits",
"raw": ["1.200"],
"header_type": "item",
"expected": [1.2, []],
"canonical": ["1.2"]
},
{
"name": "decimal with 2 significant digits and 1 insignificant digit",
"raw": ["1.230"],
"header_type": "item",
"expected": [1.23, []],
"canonical": ["1.23"]
}
]

0 comments on commit 88c3fc3

Please sign in to comment.