exercism / unison

Exercism exercises in Unison.
https://exercism.org/tracks/unison
MIT License
3 stars 19 forks source link

Dnd character exercise #116

Closed SimaDovakin closed 5 months ago

SimaDovakin commented 5 months ago

@ErikSchierboom @rlmark, for #48in24. I adapted the Haskell implementation.

rlmark commented 5 months ago

Wow! Thank you! We love DND at Unison.

It looks like that test is failing the transcripts, and I think I see a quick thing to try:

The transcript is looking for a term called dndCharacter.tests which it renames to tests in this file:

https://github.com/exercism/unison/blob/03ca68c15432bcb2f2bdbca2cc1f79a9a0c37403/exercises/practice/dnd-character/.meta/testLoader.md

This term brings together all the tests into one easily runnable function for Unison. Check out how all the tests for allergies get combined in a list in this file for an idea:

https://github.com/exercism/unison/blob/main/exercises/practice/allergies/allergies.test.u

SimaDovakin commented 5 months ago

Thank you for your guidance! I just didn't read the documentation about testing in Unison thoroughly. I had a problem with the verify function and realized that, maybe, there is no one in this UCM version. So I decided to use base.test.gen to generate seed for Random.lcg.

Now, I'm going to clean up the implementation a little bit.

ErikSchierboom commented 5 months ago

@SimaDovakin Great work! I'll let @rlmark handle the rest.