From 0baae88338800411cc5ecd28f0b11952c7acef6a Mon Sep 17 00:00:00 2001 From: Vladislav Popov Date: Tue, 7 Nov 2023 10:52:03 +0300 Subject: [PATCH] fix running formula (#73) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Владислав Попов --- cmd/fitnesstest/main_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/fitnesstest/main_test.go b/cmd/fitnesstest/main_test.go index e25eb5e..cd56ea8 100644 --- a/cmd/fitnesstest/main_test.go +++ b/cmd/fitnesstest/main_test.go @@ -101,7 +101,7 @@ func (s *FitnessSuite) TestRunningSpentCalories() { weightNum := float64(rnd.Int63n(140-80) + 80) meanSpeed := testMeanSpeed(actionsNum, durationNum) - expected := ((_runningCaloriesMeanSpeedMultiplier * meanSpeed * _runningCaloriesMeanSpeedShift) * weightNum / _mInKm * durationNum * _minInH) + expected := ((_runningCaloriesMeanSpeedMultiplier*meanSpeed + _runningCaloriesMeanSpeedShift) * weightNum / _mInKm * durationNum * _minInH) res := RunningSpentCalories(actionsNum, weightNum, durationNum) s.Assert().InDelta(expected, res, 0.05, "Значение полученное из функции RunningSpentCalories не совпадает с ожидаемым")