Add test for remaining-time function

This PR introduces a new test case for the remaining_time function in lucians-luscious-lasagna exercise.
This additional test complements the existing one and verifies the function’s logic operates as intended, not just a fixed subtraction or hardcoding.

You can refer to the bellow image to see how the faulty implementation is making all the test cases pass

This will affect every track that has implemented this exercise. So everyone can benefit, please make a PR on the problem-specifications repo instead.

Thanks for your reply. I don’t see the “lucians-luscious-lasagna” exercise in the problem-specification repo.
Could you please share me docs on how I can reopen this PR in the clojure repo and make the change?

The lasagna exercise is not in problem-specifications. Other tracks can choose to implement this additional test.

This extra check doesn’t really add any significant value, because nobody is expected to implement the remaining time function as (- actual-time 10).

So this is a very specific implementation with the intent of making the tests fail making an incorrect implementation pass the tests, and you’ll find that you can do the same in many exercises.

Bottom line is that the tests aren’t expected to be exhaustive and that’s perfectly fine.

Oops, sorry.

1 Like