commit | 02af3965c54e8cacf948b97fef38925c4120652c | [log] [tgz] |
---|---|---|

author | Dustin Sallings <dustin@spy.net> | Sat Apr 21 18:26:05 2018 |

committer | Dustin Sallings <dustin@spy.net> | Sat Apr 21 18:29:45 2018 |

tree | 6ca9ae447e4bb52953ea9f2602a4736440dc1a4e | |

parent | 41f808901d8eb7d8d4e70a79b62b0d1b504e3f9a [diff] |

Added a quickcheck test for stripTrailingDigits The coverage report showed that the existing tests didn't cover one of the paths, so I made a simple property test to cover the rest. This is slightly awkward in go, but the bulk of the test is generating random input with some number of digits on the left, then some number of digits on the right of a decimal point. If there are no digits on the right, it doesn't add the decimal point. Then it emits a reasonably ranged digit input.

1 file changed

tree: 6ca9ae447e4bb52953ea9f2602a4736440dc1a4e