Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add randomized tests #5

Open
stylewarning opened this issue Jul 6, 2016 · 2 comments
Open

Add randomized tests #5

stylewarning opened this issue Jul 6, 2016 · 2 comments

Comments

@stylewarning
Copy link
Contributor

It's possible to do more comprehensive testing with randomized tests. Something like

(let ((r (random most-positive-double-float)))
  (= r (parse-float:parse-float (prin1-to-string r) :type 'double-float
                                                    :exponent-character #\d)))
@soemraws
Copy link
Owner

Nice idea.

Do you now if random states are the same across all platforms? I would hate it if test 213 fails on one computer and I cannot reproduce it on mine.

@stylewarning
Copy link
Contributor Author

Random states are definitely not portable, unfortunately.

For single floats, we may opt to just test them all. Why not?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants