@@ -378,6 +378,7 @@ contains
378
378
type(error_type), allocatable, intent(out) :: error
379
379
${t1}$ :: x(6) = [${t1}$ :: 0, 5, 15, 30, 50, 75]
380
380
${t1}$ :: A(1, 3) = reshape([${t1}$ :: 1, 3, 5], [1, 3])
381
+ ${t1}$ :: B(2) = [${t1}$ :: 1, 2]
381
382
382
383
call check(error, all_close(diff(x), [${t1}$ :: 5, 10, 15, 20, 25]), &
383
384
"diff(x) in test_diff_real_${k1}$ failed")
@@ -391,6 +392,10 @@ contains
391
392
"diff(x, n=1, dim=2) in test_diff_real_${k1}$ failed")
392
393
if (allocated(error)) return
393
394
395
+ call check(error, size(diff(B, 2)), 0, "size(diff(B, 2)) in test_diff_real_${k1}$ failed")
396
+ if (allocated(error)) return
397
+ call check(error, size(diff(B, 3)), 0, "size(diff(B, 3)) in test_diff_real_${k1}$ failed")
398
+
394
399
end subroutine test_diff_real_${k1}$
395
400
#:endfor
396
401
@@ -399,6 +404,7 @@ contains
399
404
type(error_type), allocatable, intent(out) :: error
400
405
${t1}$ :: x(6) = [${t1}$ :: 0, 5, 15, 30, 50, 75]
401
406
${t1}$ :: A(1, 3) = reshape([${t1}$ :: 1, 3, 5], [1, 3])
407
+ ${t1}$ :: B(2) = [${t1}$ :: 1, 2]
402
408
403
409
call check(error, all(diff(x) == [${t1}$ :: 5, 10, 15, 20, 25]), &
404
410
"diff(x) in test_diff_int_${k1}$ failed")
@@ -412,6 +418,10 @@ contains
412
418
"diff(A, n=1, dim=2) in test_diff_int_${k1}$ failed")
413
419
if (allocated(error)) return
414
420
421
+ call check(error, size(diff(B, 2)), 0, "size(diff(B, 2)) in test_diff_real_${k1}$ failed")
422
+ if (allocated(error)) return
423
+ call check(error, size(diff(B, 3)), 0, "size(diff(B, 3)) in test_diff_real_${k1}$ failed")
424
+
415
425
end subroutine test_diff_int_${k1}$
416
426
#:endfor
417
427
0 commit comments