fortran_tester
 All Classes Files Functions Variables Pages
tester.f90
Go to the documentation of this file.
1 ! This file is part of fortran_tester
2 ! Copyright 2015-2020 Pierre de Buyl and contributors
3 ! License: BSD
4 
10 
11 module tester
12  use, intrinsic :: iso_fortran_env, only : int8, int16, int32, int64, real32, real64
13 
14  implicit none
15  private
16  public :: tester_t
17 
19  type :: tester_t
20  integer(int32) :: n_errors=0_int32
21  integer(int32) :: n_tests=0_int32
22  real(real32) :: tolerance32=2._real32*epsilon(1._real32)
23  real(real64) :: tolerance64=2._real64*epsilon(1._real64)
24  contains
25  procedure :: init
26  procedure :: print
27  generic, public :: assert_equal => &
46  procedure, private :: assert_equal_i8
47  procedure, private :: assert_equal_i16
48  procedure, private :: assert_equal_i32
49  procedure, private :: assert_equal_i64
50  procedure, private :: assert_equal_r32
51  procedure, private :: assert_equal_r64
52  procedure, private :: assert_equal_c32
53  procedure, private :: assert_equal_c64
54  procedure, private :: assert_equal_l
55  procedure, private :: assert_equal_i8_1
56  procedure, private :: assert_equal_i16_1
57  procedure, private :: assert_equal_i32_1
58  procedure, private :: assert_equal_i64_1
59  procedure, private :: assert_equal_r32_1
60  procedure, private :: assert_equal_r64_1
61  procedure, private :: assert_equal_c32_1
62  procedure, private :: assert_equal_c64_1
63  procedure, private :: assert_equal_l_1
64  generic, public :: assert_positive => &
77  procedure, private :: assert_positive_i8
78  procedure, private :: assert_positive_i16
79  procedure, private :: assert_positive_i32
80  procedure, private :: assert_positive_i64
81  procedure, private :: assert_positive_r32
82  procedure, private :: assert_positive_r64
83  procedure, private :: assert_positive_i8_1
84  procedure, private :: assert_positive_i16_1
85  procedure, private :: assert_positive_i32_1
86  procedure, private :: assert_positive_i64_1
87  procedure, private :: assert_positive_r32_1
88  procedure, private :: assert_positive_r64_1
89  generic, public :: assert_close => &
98  procedure, private :: assert_close_r32
99  procedure, private :: assert_close_r64
100  procedure, private :: assert_close_c32
101  procedure, private :: assert_close_c64
102  procedure, private :: assert_close_r32_1
103  procedure, private :: assert_close_r64_1
104  procedure, private :: assert_close_c32_1
105  procedure, private :: assert_close_c64_1
106  end type tester_t
107 
108 contains
109 
111  subroutine init(this, tolerance32, tolerance64)
112  class(tester_t), intent(out) :: this
113  real(real32), intent(in), optional :: tolerance32
114  real(real64), intent(in), optional :: tolerance64
115 
116  this% n_errors = 0
117  this% n_tests = 0
118 
119  if (present(tolerance64)) then
120  this% tolerance64 = tolerance64
121  else
122  this% tolerance64 = 2._real64*epsilon(1._real64)
123  end if
124 
125  if (present(tolerance32)) then
126  this% tolerance32 = tolerance32
127  else
128  this% tolerance32 = 2._real32*epsilon(1._real32)
129  end if
130 
131  end subroutine init
132 
134  subroutine print(this, errorstop)
135  class(tester_t), intent(in) :: this
136  logical, intent(in), optional :: errorstop
137 
138  logical :: do_errorstop
139  if (present(errorstop)) then
140  do_errorstop = errorstop
141  else
142  do_errorstop = .true.
143  end if
144 
145  write(*,*) 'fortran_tester:', this% n_errors, ' error(s) for', this% n_tests, 'test(s)'
146 
147  if (this% n_errors == 0) then
148  write(*,*) 'fortran_tester: all tests succeeded'
149  else
150  write(*,*) 'fortran_tester: tests failed'
151  if (do_errorstop) then
152  stop 1
153  end if
154  end if
155 
156  end subroutine print
157 
159  subroutine assert_equal_i8(this, i1, i2)
160  class(tester_t), intent(inout) :: this
161  integer(int8), intent(in) :: i1
162  integer(int8), intent(in) :: i2
163 
164  this% n_tests = this% n_tests + 1
165  if (i1 .ne. i2) then
166  this% n_errors = this% n_errors + 1
167  end if
168 
169  end subroutine assert_equal_i8
170 
172  subroutine assert_equal_i16(this, i1, i2)
173  class(tester_t), intent(inout) :: this
174  integer(int16), intent(in) :: i1
175  integer(int16), intent(in) :: i2
176 
177  this% n_tests = this% n_tests + 1
178  if (i1 .ne. i2) then
179  this% n_errors = this% n_errors + 1
180  end if
181 
182  end subroutine assert_equal_i16
183 
185  subroutine assert_equal_i32(this, i1, i2)
186  class(tester_t), intent(inout) :: this
187  integer(int32), intent(in) :: i1
188  integer(int32), intent(in) :: i2
189 
190  this% n_tests = this% n_tests + 1
191  if (i1 .ne. i2) then
192  this% n_errors = this% n_errors + 1
193  end if
194 
195  end subroutine assert_equal_i32
196 
198  subroutine assert_equal_i64(this, i1, i2)
199  class(tester_t), intent(inout) :: this
200  integer(int64), intent(in) :: i1
201  integer(int64), intent(in) :: i2
202 
203  this% n_tests = this% n_tests + 1
204  if (i1 .ne. i2) then
205  this% n_errors = this% n_errors + 1
206  end if
207 
208  end subroutine assert_equal_i64
209 
211  subroutine assert_equal_r32(this, r1, r2)
212  class(tester_t), intent(inout) :: this
213  real(real32), intent(in) :: r1
214  real(real32), intent(in) :: r2
215 
216  this% n_tests = this% n_tests + 1
217  if (r1 .ne. r2) then
218  this% n_errors = this% n_errors + 1
219  end if
220 
221  end subroutine assert_equal_r32
222 
224  subroutine assert_equal_r64(this, r1, r2)
225  class(tester_t), intent(inout) :: this
226  real(real64), intent(in) :: r1
227  real(real64), intent(in) :: r2
228 
229  this% n_tests = this% n_tests + 1
230  if (r1 .ne. r2) then
231  this% n_errors = this% n_errors + 1
232  end if
233 
234  end subroutine assert_equal_r64
235 
237  subroutine assert_equal_c32(this, c1, c2)
238  class(tester_t), intent(inout) :: this
239  complex(real32), intent(in) :: c1
240  complex(real32), intent(in) :: c2
241 
242  this% n_tests = this% n_tests + 1
243  if (c1 .ne. c2) then
244  this% n_errors = this% n_errors + 1
245  end if
246 
247  end subroutine assert_equal_c32
248 
250  subroutine assert_equal_c64(this, c1, c2)
251  class(tester_t), intent(inout) :: this
252  complex(real64), intent(in) :: c1
253  complex(real64), intent(in) :: c2
254 
255  this% n_tests = this% n_tests + 1
256  if (c1 .ne. c2) then
257  this% n_errors = this% n_errors + 1
258  end if
259 
260  end subroutine assert_equal_c64
261 
263  subroutine assert_equal_l(this, l1, l2)
264  class(tester_t), intent(inout) :: this
265  logical, intent(in) :: l1
266  logical, intent(in) :: l2
267 
268  this% n_tests = this% n_tests + 1
269  if (l1 .neqv. l2) then
270  this% n_errors = this% n_errors + 1
271  end if
272 
273  end subroutine assert_equal_l
274 
276  subroutine assert_equal_i8_1(this, i1, i2)
277  class(tester_t), intent(inout) :: this
278  integer(int8), dimension(:), intent(in) :: i1
279  integer(int8), dimension(:), intent(in) :: i2
280 
281  this% n_tests = this% n_tests + 1
282 
283  if ( size(i1) .ne. size(i2) ) then
284  this% n_errors = this% n_errors + 1
285  else
286  if ( maxval(abs(i1-i2)) > 0 ) then
287  this% n_errors = this% n_errors + 1
288  end if
289  end if
290 
291  end subroutine assert_equal_i8_1
292 
294  subroutine assert_equal_i16_1(this, i1, i2)
295  class(tester_t), intent(inout) :: this
296  integer(int16), dimension(:), intent(in) :: i1
297  integer(int16), dimension(:), intent(in) :: i2
298 
299  this% n_tests = this% n_tests + 1
300 
301  if ( size(i1) .ne. size(i2) ) then
302  this% n_errors = this% n_errors + 1
303  else
304  if ( maxval(abs(i1-i2)) > 0 ) then
305  this% n_errors = this% n_errors + 1
306  end if
307  end if
308 
309  end subroutine assert_equal_i16_1
310 
312  subroutine assert_equal_i32_1(this, i1, i2)
313  class(tester_t), intent(inout) :: this
314  integer(int32), dimension(:), intent(in) :: i1
315  integer(int32), dimension(:), intent(in) :: i2
316 
317  this% n_tests = this% n_tests + 1
318 
319  if ( size(i1) .ne. size(i2) ) then
320  this% n_errors = this% n_errors + 1
321  else
322  if ( maxval(abs(i1-i2)) > 0 ) then
323  this% n_errors = this% n_errors + 1
324  end if
325  end if
326 
327  end subroutine assert_equal_i32_1
328 
330  subroutine assert_equal_i64_1(this, i1, i2)
331  class(tester_t), intent(inout) :: this
332  integer(int64), dimension(:), intent(in) :: i1
333  integer(int64), dimension(:), intent(in) :: i2
334 
335  this% n_tests = this% n_tests + 1
336 
337  if ( size(i1) .ne. size(i2) ) then
338  this% n_errors = this% n_errors + 1
339  else
340  if ( maxval(abs(i1-i2)) > 0 ) then
341  this% n_errors = this% n_errors + 1
342  end if
343  end if
344 
345  end subroutine assert_equal_i64_1
346 
348  subroutine assert_equal_r32_1(this, r1, r2)
349  class(tester_t), intent(inout) :: this
350  real(real32), dimension(:), intent(in) :: r1
351  real(real32), dimension(:), intent(in) :: r2
352 
353  this% n_tests = this% n_tests + 1
354 
355  if ( size(r1) .ne. size(r2) ) then
356  this% n_errors = this% n_errors + 1
357  else
358  if ( maxval(abs(r1-r2)) > 0 ) then
359  this% n_errors = this% n_errors + 1
360  end if
361  end if
362 
363  end subroutine assert_equal_r32_1
364 
366  subroutine assert_equal_r64_1(this, r1, r2)
367  class(tester_t), intent(inout) :: this
368  real(real64), dimension(:), intent(in) :: r1
369  real(real64), dimension(:), intent(in) :: r2
370 
371  this% n_tests = this% n_tests + 1
372 
373  if ( size(r1) .ne. size(r2) ) then
374  this% n_errors = this% n_errors + 1
375  else
376  if ( maxval(abs(r1-r2)) > 0 ) then
377  this% n_errors = this% n_errors + 1
378  end if
379  end if
380 
381  end subroutine assert_equal_r64_1
382 
384  subroutine assert_equal_c32_1(this, c1, c2)
385  class(tester_t), intent(inout) :: this
386  complex(real32), dimension(:), intent(in) :: c1
387  complex(real32), dimension(:), intent(in) :: c2
388 
389  this% n_tests = this% n_tests + 1
390 
391  if ( size(c1) .ne. size(c2) ) then
392  this% n_errors = this% n_errors + 1
393  else
394  if ( maxval(abs(c1-c2)) > 0 ) then
395  this% n_errors = this% n_errors + 1
396  end if
397  end if
398 
399  end subroutine assert_equal_c32_1
400 
402  subroutine assert_equal_c64_1(this, c1, c2)
403  class(tester_t), intent(inout) :: this
404  complex(real64), dimension(:), intent(in) :: c1
405  complex(real64), dimension(:), intent(in) :: c2
406 
407  this% n_tests = this% n_tests + 1
408 
409  if ( size(c1) .ne. size(c2) ) then
410  this% n_errors = this% n_errors + 1
411  else
412  if ( maxval(abs(c1-c2)) > 0 ) then
413  this% n_errors = this% n_errors + 1
414  end if
415  end if
416 
417  end subroutine assert_equal_c64_1
418 
420  subroutine assert_equal_l_1(this, l1, l2)
421  class(tester_t), intent(inout) :: this
422  logical, intent(in), dimension(:) :: l1
423  logical, intent(in), dimension(:) :: l2
424 
425  integer :: k
426 
427  this% n_tests = this% n_tests + 1
428 
429  if ( size(l1) .ne. size(l2) ) then
430  this% n_errors = this% n_errors + 1
431  else
432  do k = 1, size(l1)
433  if (l1(k) .neqv. l2(k)) then
434  this% n_errors = this% n_errors + 1
435  exit
436  end if
437  end do
438  end if
439 
440  end subroutine assert_equal_l_1
441 
443  subroutine assert_positive_i8(this, i)
444  class(tester_t), intent(inout) :: this
445  integer(int8), intent(in) :: i
446 
447  this% n_tests = this% n_tests + 1
448  if (i < 0) then
449  this% n_errors = this% n_errors + 1
450  end if
451 
452  end subroutine assert_positive_i8
453 
455  subroutine assert_positive_i16(this, i)
456  class(tester_t), intent(inout) :: this
457  integer(int16), intent(in) :: i
458 
459  this% n_tests = this% n_tests + 1
460  if (i < 0) then
461  this% n_errors = this% n_errors + 1
462  end if
463 
464  end subroutine assert_positive_i16
465 
467  subroutine assert_positive_i32(this, i)
468  class(tester_t), intent(inout) :: this
469  integer(int32), intent(in) :: i
470 
471  this% n_tests = this% n_tests + 1
472  if (i < 0) then
473  this% n_errors = this% n_errors + 1
474  end if
475 
476  end subroutine assert_positive_i32
477 
479  subroutine assert_positive_i64(this, i)
480  class(tester_t), intent(inout) :: this
481  integer(int64), intent(in) :: i
482 
483  this% n_tests = this% n_tests + 1
484  if (i < 0) then
485  this% n_errors = this% n_errors + 1
486  end if
487 
488  end subroutine assert_positive_i64
489 
491  subroutine assert_positive_r32(this, r)
492  class(tester_t), intent(inout) :: this
493  real(real32), intent(in) :: r
494 
495  this% n_tests = this% n_tests + 1
496  if (r < 0) then
497  this% n_errors = this% n_errors + 1
498  end if
499 
500  end subroutine assert_positive_r32
501 
503  subroutine assert_positive_r64(this, r)
504  class(tester_t), intent(inout) :: this
505  real(real64), intent(in) :: r
506 
507  this% n_tests = this% n_tests + 1
508  if (r < 0) then
509  this% n_errors = this% n_errors + 1
510  end if
511 
512  end subroutine assert_positive_r64
513 
515  subroutine assert_positive_i8_1(this, i)
516  class(tester_t), intent(inout) :: this
517  integer(int8), dimension(:), intent(in) :: i
518 
519  this% n_tests = this% n_tests + 1
520 
521  if ( minval(i) < 0 ) then
522  this% n_errors = this% n_errors + 1
523  end if
524 
525  end subroutine assert_positive_i8_1
526 
528  subroutine assert_positive_i16_1(this, i)
529  class(tester_t), intent(inout) :: this
530  integer(int16), dimension(:), intent(in) :: i
531 
532  this% n_tests = this% n_tests + 1
533 
534  if ( minval(i) < 0 ) then
535  this% n_errors = this% n_errors + 1
536  end if
537 
538  end subroutine assert_positive_i16_1
539 
541  subroutine assert_positive_i32_1(this, i)
542  class(tester_t), intent(inout) :: this
543  integer(int32), dimension(:), intent(in) :: i
544 
545  this% n_tests = this% n_tests + 1
546 
547  if ( minval(i) < 0 ) then
548  this% n_errors = this% n_errors + 1
549  end if
550 
551  end subroutine assert_positive_i32_1
552 
554  subroutine assert_positive_i64_1(this, i)
555  class(tester_t), intent(inout) :: this
556  integer(int64), dimension(:), intent(in) :: i
557 
558  this% n_tests = this% n_tests + 1
559 
560  if ( minval(i) < 0 ) then
561  this% n_errors = this% n_errors + 1
562  end if
563 
564  end subroutine assert_positive_i64_1
565 
567  subroutine assert_positive_r32_1(this, r)
568  class(tester_t), intent(inout) :: this
569  real(real32), dimension(:), intent(in) :: r
570 
571  this% n_tests = this% n_tests + 1
572 
573  if ( minval(r) < 0 ) then
574  this% n_errors = this% n_errors + 1
575  end if
576 
577  end subroutine assert_positive_r32_1
578 
580  subroutine assert_positive_r64_1(this, r)
581  class(tester_t), intent(inout) :: this
582  real(real64), dimension(:), intent(in) :: r
583 
584  this% n_tests = this% n_tests + 1
585 
586  if ( minval(r) < 0 ) then
587  this% n_errors = this% n_errors + 1
588  end if
589 
590  end subroutine assert_positive_r64_1
591 
593  subroutine assert_close_r32(this, r1, r2)
594  class(tester_t), intent(inout) :: this
595  real(real32), intent(in) :: r1
596  real(real32), intent(in) :: r2
597 
598  this% n_tests = this% n_tests + 1
599 
600  if ( abs(r1-r2) > this% tolerance32 ) then
601  this% n_errors = this% n_errors + 1
602  end if
603 
604  end subroutine assert_close_r32
605 
607  subroutine assert_close_r64(this, r1, r2)
608  class(tester_t), intent(inout) :: this
609  real(real64), intent(in) :: r1
610  real(real64), intent(in) :: r2
611 
612  this% n_tests = this% n_tests + 1
613 
614  if ( abs(r1-r2) > this% tolerance64 ) then
615  this% n_errors = this% n_errors + 1
616  end if
617 
618  end subroutine assert_close_r64
619 
621  subroutine assert_close_r32_1(this, r1, r2)
622  class(tester_t), intent(inout) :: this
623  real(real32), intent(in), dimension(:) :: r1
624  real(real32), intent(in), dimension(:) :: r2
625 
626  this% n_tests = this% n_tests + 1
627 
628  if ( size(r1) .ne. size(r2) ) then
629  this% n_errors = this% n_errors + 1
630  else
631  if ( maxval(abs(r1-r2)) > this% tolerance32 ) then
632  this% n_errors = this% n_errors + 1
633  end if
634  end if
635 
636  end subroutine assert_close_r32_1
637 
639  subroutine assert_close_r64_1(this, r1, r2)
640  class(tester_t), intent(inout) :: this
641  real(real64), intent(in), dimension(:) :: r1
642  real(real64), intent(in), dimension(:) :: r2
643 
644  this% n_tests = this% n_tests + 1
645 
646  if ( size(r1) .ne. size(r2) ) then
647  this% n_errors = this% n_errors + 1
648  else
649  if ( maxval(abs(r1-r2)) > this% tolerance64 ) then
650  this% n_errors = this% n_errors + 1
651  end if
652  end if
653 
654  end subroutine assert_close_r64_1
655 
657  subroutine assert_close_c32(this, c1, c2)
658  class(tester_t), intent(inout) :: this
659  complex(real32), intent(in) :: c1
660  complex(real32), intent(in) :: c2
661 
662  this% n_tests = this% n_tests + 1
663 
664  if ( abs(c1-c2) > this% tolerance32 ) then
665  this% n_errors = this% n_errors + 1
666  end if
667 
668  end subroutine assert_close_c32
669 
671  subroutine assert_close_c64(this, r1, c2)
672  class(tester_t), intent(inout) :: this
673  complex(real64), intent(in) :: r1
674  complex(real64), intent(in) :: c2
675 
676  this% n_tests = this% n_tests + 1
677 
678  if ( abs(r1-c2) > this% tolerance64 ) then
679  this% n_errors = this% n_errors + 1
680  end if
681 
682  end subroutine assert_close_c64
683 
685  subroutine assert_close_c32_1(this, c1, c2)
686  class(tester_t), intent(inout) :: this
687  complex(real32), intent(in), dimension(:) :: c1
688  complex(real32), intent(in), dimension(:) :: c2
689 
690  this% n_tests = this% n_tests + 1
691 
692  if ( size(c1) .ne. size(c2) ) then
693  this% n_errors = this% n_errors + 1
694  else
695  if ( maxval(abs(c1-c2)) > this% tolerance32 ) then
696  this% n_errors = this% n_errors + 1
697  end if
698  end if
699 
700  end subroutine assert_close_c32_1
701 
703  subroutine assert_close_c64_1(this, c1, c2)
704  class(tester_t), intent(inout) :: this
705  complex(real64), intent(in), dimension(:) :: c1
706  complex(real64), intent(in), dimension(:) :: c2
707 
708  this% n_tests = this% n_tests + 1
709 
710  if ( size(c1) .ne. size(c2) ) then
711  this% n_errors = this% n_errors + 1
712  else
713  if ( maxval(abs(c1-c2)) > this% tolerance64 ) then
714  this% n_errors = this% n_errors + 1
715  end if
716  end if
717 
718  end subroutine assert_close_c64_1
719 
720 end module tester
procedure, private assert_close_c64
Check if two complex numbers (64 bits) are close with respect a tolerance.
Definition: tester.f90:101
procedure, private assert_equal_l_1
Check if two logical arrays (rank 1) are equal.
Definition: tester.f90:63
procedure, private assert_close_r32
Check if two reals (32 bits) are close with respect a tolerance.
Definition: tester.f90:98
procedure, private assert_positive_r64
Check if a real (64 bits) is positive.
Definition: tester.f90:82
procedure, private assert_equal_l
Check if two logicals are equal.
Definition: tester.f90:54
procedure, private assert_positive_i32_1
Check if a integer (32 bits) array (rank 1) is positive.
Definition: tester.f90:85
procedure, private assert_positive_i16_1
Check if a integer (16 bits) array (rank 1) is positive.
Definition: tester.f90:84
procedure, private assert_positive_i8_1
Check if a integer (8 bits) array (rank 1) is positive.
Definition: tester.f90:83
procedure, private assert_close_c32_1
Check if two complex (32 bits) arrays (rank 1) are close with respect a tolerance.
Definition: tester.f90:104
procedure, private assert_positive_r32
Check if a real (32 bits) is positive.
Definition: tester.f90:81
procedure, private assert_equal_i64_1
Check if two integer (64 bits) arrays (rank 1) are equal.
Definition: tester.f90:58
procedure, private assert_positive_i16
Check if a integer (16 bits) is positive.
Definition: tester.f90:78
procedure, private assert_positive_i64_1
Check if a integer (64 bits) array (rank 1) is positive.
Definition: tester.f90:86
procedure, private assert_equal_i16
Check if two integers (16 bits) are equal.
Definition: tester.f90:47
procedure, private assert_equal_i32_1
Check if two integer (32 bits) arrays (rank 1) are equal.
Definition: tester.f90:57
procedure, private assert_equal_i16_1
Check if two integer (16 bits) arrays (rank 1) are equal.
Definition: tester.f90:56
procedure, private assert_equal_i8_1
Check if two integer (8 bits) arrays (rank 1) are equal.
Definition: tester.f90:55
procedure, private assert_equal_c64_1
Check if two complex (64 bits) arrays (rank 1) are equal.
Definition: tester.f90:62
procedure, private assert_equal_i32
Check if two integers (32 bits) are equal.
Definition: tester.f90:48
procedure, private assert_equal_c32_1
Check if two complex (32 bits) arrays (rank 1) are equal.
Definition: tester.f90:61
generic, public assert_positive=>assert_positive_i8,assert_positive_i16,assert_positive_i32,assert_positive_i64,assert_positive_r32,assert_positive_r64,assert_positive_i8_1,assert_positive_i16_1,assert_positive_i32_1,assert_positive_i64_1,assert_positive_r32_1,assert_positive_r64_1
Check if a number (integer or real) is positive.
Definition: tester.f90:64
procedure, private assert_close_c32
Check if two complex numbers (32 bits) are close with respect a tolerance.
Definition: tester.f90:100
procedure, private assert_equal_c64
Check if two complex numbers (64 bits) are equal.
Definition: tester.f90:53
procedure, private assert_equal_i64
Check if two integers (64 bits) are equal.
Definition: tester.f90:49
procedure, private assert_equal_r32
Check if two reals (32 bits) are equal.
Definition: tester.f90:50
procedure, private assert_close_r64
Check if two reals (64 bits) are close with respect a tolerance.
Definition: tester.f90:99
procedure, private assert_equal_c32
Check if two complex numbers (32 bits) are equal.
Definition: tester.f90:52
procedure, private assert_equal_i8
Check if two integers (8 bits) are equal.
Definition: tester.f90:46
procedure, private assert_positive_r32_1
Check if a real (32 bits) array (rank 1) is positive.
Definition: tester.f90:87
procedure, private assert_equal_r64
Check if two reals (64 bits) are equal.
Definition: tester.f90:51
procedure print
Print tests results.
Definition: tester.f90:26
generic, public assert_equal=>assert_equal_i8,assert_equal_i16,assert_equal_i32,assert_equal_i64,assert_equal_r32,assert_equal_r64,assert_equal_c32,assert_equal_c64,assert_equal_l,assert_equal_i8_1,assert_equal_i16_1,assert_equal_i32_1,assert_equal_i64_1,assert_equal_r32_1,assert_equal_r64_1,assert_equal_c32_1,assert_equal_c64_1,assert_equal_l_1
Check if two values (integer, real, complex or logical) are equal.
Definition: tester.f90:27
procedure, private assert_positive_i8
Check if a integer (8 bits) is positive.
Definition: tester.f90:77
procedure, private assert_positive_i32
Check if a integer (32 bits) is positive.
Definition: tester.f90:79
procedure, private assert_positive_i64
Check if a integer (64 bits) is positive.
Definition: tester.f90:80
procedure, private assert_equal_r64_1
Check if two real (64 bits) arrays (rank 1) are equal.
Definition: tester.f90:60
procedure, private assert_close_c64_1
Check if two complex (64 bits) arrays (rank 1) are close with respect a tolerance.
Definition: tester.f90:105
generic, public assert_close=>assert_close_r32,assert_close_r64,assert_close_c32,assert_close_c64,assert_close_r32_1,assert_close_r64_1,assert_close_c32_1,assert_close_c64_1
Check if two values (real or complex) are close with respect a tolerance.
Definition: tester.f90:89
procedure, private assert_close_r64_1
Check if two real (64 bits) arrays (rank 1) are close with respect a tolerance.
Definition: tester.f90:103
procedure init
Initialize the tester.
Definition: tester.f90:25
procedure, private assert_positive_r64_1
Check if a real (64 bits) array (rank 1) is positive.
Definition: tester.f90:88
procedure, private assert_close_r32_1
Check if two real (32 bits) arrays (rank 1) are close with respect a tolerance.
Definition: tester.f90:102
Routines to test Fortran programs.
Definition: tester.f90:11
The main tester class.
Definition: tester.f90:19
procedure, private assert_equal_r32_1
Check if two real (32 bits) arrays (rank 1) are equal.
Definition: tester.f90:59