racket / htdp

Other
92 stars 70 forks source link

Fixes #127 and 93e087ecd7ebf0fa3e. #128

Closed shhyou closed 3 years ago

rfindler commented 3 years ago

Does the test-execute parameter ever actually get a value that's a boolean?

shhyou commented 3 years ago

Yes, as set by the Test Engine plugin https://github.com/racket/htdp/blob/93e087ecd7ebf0fa3ee9ea90caff418d7e1e9df1/htdp-lib/test-engine/test-tool.rkt#L135-L144

rfindler commented 3 years ago

Oops! I meant not a boolean. (I'm asking about the comment change that's in the diff in the PR.)

shhyou commented 3 years ago

If the Test Engine plugin is not loaded, the exception handler will pass 'uninstalled to test-on?. It then flows into test-execute. https://github.com/racket/htdp/blob/93e087ecd7ebf0fa3ee9ea90caff418d7e1e9df1/htdp-lib/lang/htdp-langs.rkt#L172-L182

shhyou commented 3 years ago

Or maybe L177 should become (test-execute (and tests-on? #t))?

rfindler commented 3 years ago

Oh, of course. Silly me. Yes, I think it is safer to be (and tests-on? #t)

rfindler commented 3 years ago

Thanks!