exercism / go-test-runner

GNU Affero General Public License v3.0
15 stars 17 forks source link

No proper error message for old version of Lasagna #40

Closed junedev closed 2 years ago

junedev commented 2 years ago

The lasagna exercise was changed to use a constant instead of a function for OvenTime.

Then I run the the old code (shown below) against the new tests, the general "an error occured" message shows up instead of an error message.

image

package lasagna

// OvenTime returns the expected baking time in minutes.
func OvenTime() int {
    return 40
}

// RemainingOvenTime returns the remaining minutes based on the `actual` minutes already in the oven.
func RemainingOvenTime(actual int) int {
    return OvenTime() - actual
}

// PreparationTime calculates the time needed to prepare the lasagna based on the amount of layers.
func PreparationTime(numberOfLayers int) int {
    return numberOfLayers *2
}

// ElapsedTime calculates the total time needed to create and bake a lasagna.
func ElapsedTime(numberOfLayers, actualMinutesInOven int) int {
    return PreparationTime(numberOfLayers) + actualMinutesInOven
}
junedev commented 2 years ago

Once #39 is fixed, this problem will probably be fixed as well.