Skip to content

Commit

Permalink
Update the test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
datejada committed Nov 7, 2023
1 parent 34a5c30 commit 7cd376d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7cd376d

Please sign in to comment.