D&D Character does not test hitpoints

I noticed that on exercice D&D Character for emacs lisp track the tests are not currently testing ‘hitpoints’ as required by description.
description has a requirement to calculate ‘hitpoints’ based on ‘constitution’, but this calculation is ignored by tests that has no assertions covering that point on requirement description.

The test in question is emacs-lisp/exercises/practice/dnd-character/dnd-character-test.el at 4387a7f35b57e712dc54dd8b710417bb496e653f · exercism/emacs-lisp · GitHub. The upstream problem-specs test includes a hitpoints check at problem-specifications/exercises/dnd-character/canonical-data.json at 99a6f01317bb993124cbe8bf8027a1cfdf2dc537 · exercism/problem-specifications · GitHub so the test isn’t fully to spec and should probably be updated. The maintainers will let you know what they want to do here.

1 Like

Maintainer here.

I would be happy to approve a PR on the emacs-lisp track.

--- a/exercises/practice/dnd-character/dnd-character-test.el
+++ b/exercises/practice/dnd-character/dnd-character-test.el
@@ -97,7 +97,8 @@
                    (valid-range-p constitution)
                    (valid-range-p intelligence)
                    (valid-range-p wisdom)
-                   (valid-range-p charisma)))))
+                   (valid-range-p charisma)
+                   (should (= (+ 10 (modifier constitution)) _hitpoints))))))
1 Like