additional test case for exercise 2 task 7

Daniel S.
Mausschubser
Mausschubser
Beiträge: 87
Registriert: 25. Sep 2007 12:28
Wohnort: Mörfelden

additional test case for exercise 2 task 7

Beitrag von Daniel S. »

I was a little surprised, that my solution for task 7 finally works with the given test cases, so I made a slightly more complex test case:

Code: Alles auswählen

(test (interp (parse '{with {y {A}} {with {x {- y 25}} {f x {- y {f {- {f x 1} 1} {f 20 3}}}}}}) (list (fundef 'f '(x y) (parse '{+ x y})) (fundef 'A '() (parse '65)))) 42)
Happy testing
Mit freundlichen Grüßen
Daniel

Benutzeravatar
sewe
Sonntagsinformatiker
Sonntagsinformatiker
Beiträge: 295
Registriert: 16. Jan 2009 14:53
Kontaktdaten:

Re: additional test case for exercise 2 task 7

Beitrag von sewe »

Thanks for posting this. We really encourage posting test cases to the forum. Regardless of s-expressions, there are only so many programs in FWAE you can write before going insane. ;-)

Antworten

Zurück zu „Archiv“