The UFZ services GitLab and Mattermost will be unavailable on Monday, December 06 from 06:00 AM to 08:00 AM due to maintenance work.

Commit 835d4598 authored by Arya Prasetya's avatar Arya Prasetya
Browse files

unit-test: complete test_mo_boxcox

parent 040ed007
Pipeline #47745 failed with stages
......@@ -6,6 +6,12 @@ module test_mo_boxcox
implicit none
logical, dimension(20) :: masking = [ &
.true., .true., .false., .true., .false., &
.true., .false., .false., .true., .false., &
.true., .true., .false., .true., .false., &
.true., .false., .false., .true., .false.]
contains
@test
......@@ -23,6 +29,19 @@ contains
@assertEqual(dx, dyx, tolerance=t, message='boxcox double precision')
dy = boxcox(dx, dl, mask= masking)
dyx = invboxcox(dy, dl, mask= masking)
@assertEqual(dx, dyx, tolerance=t, message='boxcox double precision masked')
@assertEqual(dx(1), invboxcox(dy(1), dl), tolerance=t, message='boxcox 0d double precision masked')
dl = 0.5_dp*tiny(0.0_dp)
dy = boxcox(dx, dl, mask= masking)
dyx = invboxcox(dy, dl, mask= masking)
@assertEqual(dx, dyx, tolerance=t, message='boxcox double precision masked small lambda')
@assertEqual(dx(1), invboxcox(dy(1), dl), tolerance=t, message='boxcox 0d double precision small lambda')
end subroutine test_boxcox_dp
@test
......@@ -40,6 +59,19 @@ contains
@assertEqual(dx, dyx, tolerance=t, message='boxcox single precision')
dy = boxcox(dx, dl, mask= masking)
dyx = invboxcox(dy, dl, mask= masking)
@assertEqual(dx, dyx, tolerance=t, message='boxcox single precision masked')
@assertEqual(dx(1), invboxcox(dy(1), dl), tolerance=t, message='boxcox 0d single precision masked')
dl = 0.5_sp*tiny(0.0_sp)
dy = boxcox(dx, dl, mask= masking)
dyx = invboxcox(dy, dl, mask= masking)
@assertEqual(dx, dyx, tolerance=t, message='boxcox single precision masked small lambda')
@assertEqual(dx(1), invboxcox(dy(1), dl), tolerance=t, message='boxcox 0d single precision small lambda')
end subroutine test_boxcox_sp
end module test_mo_boxcox
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment