-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_unittest.F90
26 lines (23 loc) · 923 Bytes
/
test_unittest.F90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
program test_unittest
use unittest, only : unittest_t
implicit none
type(unittest_t) :: test
call test%init()
call test%start_case()
call test%assert_true(2>1, __FILE__, __LINE__)
call test%assert_false(1<2, __FILE__, __LINE__)
call test%assert_equal(1, 1, __FILE__, __LINE__)
call test%assert_equal(1, 2, __FILE__, __LINE__)
call test%assert_equal(1.1, 1.1, __FILE__, __LINE__)
call test%assert_equal(1.1, 1.2, __FILE__, __LINE__)
call test%assert_equal('abc', 'abc', __FILE__, __LINE__)
call test%assert_equal('abc', 'abcd', __FILE__, __LINE__)
call test%assert_equal(.true., .true., __FILE__, __LINE__)
call test%assert_equal(.true., .false., __FILE__, __LINE__)
call test%end_case()
call test%start_case()
call test%assert_false(.true., __FILE__, __LINE__)
call test%assert_true(.false., __FILE__, __LINE__)
call test%end_case()
call test%summary()
end program test_unittest