@@ -21,7 +21,8 @@ subroutine collect_gauss(testsuite)
21
21
new_unittest(" gauss-lobatto-analytic" , test_gauss_lobatto_analytic), &
22
22
new_unittest(" gauss-lobatto-5" , test_gauss_lobatto_5), &
23
23
new_unittest(" gauss-lobatto-32" , test_gauss_lobatto_32), &
24
- new_unittest(" gauss-lobatto-64" , test_gauss_lobatto_64) &
24
+ new_unittest(" gauss-lobatto-64" , test_gauss_lobatto_64), &
25
+ new_unittest(" gauss-github-issue-619" , test_fix_github_issue619) &
25
26
]
26
27
end subroutine
27
28
@@ -48,6 +49,25 @@ subroutine test_gauss_analytic(error)
48
49
49
50
end subroutine
50
51
52
+ subroutine test_fix_github_issue619 (error )
53
+ ! > See github issue https://github.com/fortran-lang/stdlib/issues/619
54
+ type (error_type), allocatable , intent (out ) :: error
55
+ integer :: i
56
+
57
+ ! test the values of nodes and weights
58
+ i = 5
59
+ block
60
+ real (dp), dimension (i) :: x1,w1,x2,w2
61
+ call gauss_legendre(x1,w1)
62
+ call gauss_legendre(x2,w2,interval= [- 1._dp , 1._dp ])
63
+
64
+ call check(error, all (abs (x1- x2) < 2 * epsilon (x1(1 ))))
65
+ if (allocated (error)) return
66
+ call check(error, all (abs (w1- w2) < 2 * epsilon (w1(1 ))))
67
+ end block
68
+
69
+ end subroutine
70
+
51
71
subroutine test_gauss_5 (error )
52
72
! > Error handling
53
73
type (error_type), allocatable , intent (out ) :: error
0 commit comments