racket / racket/drracket

`check-expect` snip output unfriendly

Open
#673 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
516
Forks
103
PR merge metrics
No merged PRs in 30d

Description

The following error-scenario seems unnecessarily unfriendly, and I'm wondering if something nicer is possible.

A student might write the following test program:

#lang htdp/bsl
(require 2htdp/image)
(check-expect (circle 10 'outline 'black) 'o)

This test will fail. The student receives an error message containing a snip that contains the expected value. Our student then---mistakenly, accidentally, or what have you---then picks up the whole snip and drops that in as a replacement expect value.

Now that student sees the even more confusing:

Actual value . differs from (instantiate (class ...) ...), the expected value.

This seems especially injurious because it shows up when a student is already grappling with code that isn't behaving the way he expects. I for one do not know how to explain this behavior in a way that makes good sense to a BSL student. Is something nicer is possible?

I do not know if this properly belongs here, or in the htdp repo, or elsewhere.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the check-expect failure in DrRacket with the htdp/bsl and 2htdp/image example from the issue. Trace how the expected-value snip is presented and then interpreted when pasted back into a test; done means the resulting error remains understandable to a BSL student.

Written by the indexing model from the issue text.

Assessment

Domain
developer-experience, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.