From 7cd376d02570ced1220d62231079cd512c051156 Mon Sep 17 00:00:00 2001 From: datejada Date: Tue, 7 Nov 2023 16:39:12 +0100 Subject: [PATCH] Update the test cases --- test/runtests.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index f0500e7..04e15c2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,14 +4,14 @@ using Test function test_fit_profile() # Test case 1: Using root finding method - profile_values = [1.0, 2.0, 3.0, 4.0, 5.0] - target_mean = 2.5 - expected_coefficient = 0.8484316283281429 + profile_values = [0.2, 0.5, 0.9, 1.0, 0.4, 0.1, 0.0] + target_mean = 0.5 + expected_coefficient = 0.7491921797062476 @test fit_profile(profile_values, target_mean) ≈ expected_coefficient atol = 1e-3 # Test case 2: Using optimization method - target_mean = 3.5 - expected_coefficient = 1.1252910585826847 + target_mean = 0.4 + expected_coefficient = 1.2550552057968192 @test fit_profile(profile_values, target_mean) ≈ expected_coefficient atol = 1e-3 end