Skip to content

check-random-within#95

Draft
samth wants to merge 1 commit into
racket:masterfrom
samth:random-within
Draft

check-random-within#95
samth wants to merge 1 commit into
racket:masterfrom
samth:random-within

Conversation

@samth

@samth samth commented Feb 15, 2020

Copy link
Copy Markdown
Member

No description provided.

@mfelleisen

Copy link
Copy Markdown
Contributor

@samth I never noticed this PR. There are no tests and no docs. If you add those, we can marge it in.

check-random-within combines check-random and check-within: the test
and expected expressions are evaluated with the same freshly-seeded
pseudo-random generator (like check-random), and the two results are
then compared up to a tolerance (like check-within). This is the form
to use when a random computation produces inexact numbers, which
check-random refuses to compare.

- test-engine/racket-tests: add the check-random-within syntax and
  do-check-random-within, and provide it.
- lang/htdp-{beginner,beginner-abbr,intermediate,intermediate-lambda,
  advanced}: export check-random-within to the student languages.
- typed/test-engine/type-env-ext: give do-check-random-within a type.
- htdp-doc .../prim-ops: document the new form.
- htdp-test .../test-engine/racket-tests: test pass, failure, and the
  non-number-tolerance error.

Supersedes the stale draft in racket#95, which predated the rewrite of
check-random into do-check-random.  (Grammar BNF listing in
std-grammar.rkt + per-language .scrbl is a remaining follow-up.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants