Seite 1 von 1

Typo in DeBrujinTest [test("interp let let ref")]

Verfasst: 10. Nov 2018 13:36
von tud_std
Dear Sirs,

If I am not mistaken I think there is a typo in DeBrujinTest : The assertion of the following test should be 2 and not 1 as what it is stated in the project template : test("interp let let ref") { assertResult(1) { interp(LetDB(1, LetDB(2, RefDB(1)))) } }
I am looking forward to your feed-back. Thank you.

Regards,

Re: Typo in DeBrujinTest [test("interp let let ref")]

Verfasst: 10. Nov 2018 14:34
von a10r
Indices start at 0 and you count from inside to outside. From the point of view of the nested RefDB(...) in the test case, value 2 is at index 0 and value 1 is at index 1. So the test is correct. Hope that helps. :)

Re: Typo in DeBrujinTest [test("interp let let ref")]

Verfasst: 10. Nov 2018 17:47
von tud_std
Many thanks for your prompt reply. I got your point.