brownplt / pyret-lang

The Pyret language.
Other
1.07k stars 111 forks source link

Enhance `is` tests on failure to check for `is=~` #1648

Open blerner opened 2 years ago

blerner commented 2 years ago

Suppose you wrote

check:
  [raw-array: 1] is [raw-array: 1]
end

The test will fail because raw arrays are mutable. We should consider rerunning the test in this case using equal-now, and if that succeeds, we should throw a customized test-failure message saying "Your test failed because of mutable data, but would have succeeded using the is=~ test operator."