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

Moderator: Konzepte der Programmiersprachen

tud_std
Erstie
Erstie
Beiträge: 19
Registriert: 13. Apr 2016 16:29

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

Beitrag von tud_std » 10. Nov 2018 13:36

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,

a10r
Erstie
Erstie
Beiträge: 11
Registriert: 4. Nov 2012 13:53

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

Beitrag von a10r » 10. Nov 2018 14:34

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. :)

tud_std
Erstie
Erstie
Beiträge: 19
Registriert: 13. Apr 2016 16:29

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

Beitrag von tud_std » 10. Nov 2018 17:47

Many thanks for your prompt reply. I got your point.

Antworten

Zurück zu „Konzepte der Programmiersprachen“