Skip to content

Commit bce562c

Browse files
committed
removed non-general test cases for slice function
1 parent a895085 commit bce562c

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

src/tests/string/test_string_functions.f90

-53
Original file line numberDiff line numberDiff line change
@@ -56,58 +56,6 @@ subroutine test_reverse_string
5656

5757
end subroutine test_reverse_string
5858

59-
subroutine test_slice_string
60-
type(string_type) :: test_string
61-
character(len=:), allocatable :: test_char
62-
test_string = "abcdefghijklmnopqrstuvwxyz"
63-
test_char = "abcdefghijklmnopqrstuvwxyz"
64-
65-
call check(slice(test_string, 2, 16, 3) == "behkn", &
66-
'function slice failed', warn=.false.)
67-
call check(slice(test_char, first=15, stride=-1) == "onmlkjihgfedcba", &
68-
'function slice failed', warn=.false.)
69-
call check(slice(test_string, last=22, stride=-1) == "zyxwv", &
70-
'function slice failed', warn=.false.)
71-
call check(slice(test_char, 7, 2) == "gfedcb", &
72-
'function slice failed', warn=.false.)
73-
call check(slice(test_string, 7, 2, 1) == "", &
74-
'function slice failed', warn=.false.)
75-
call check(slice(test_char, 2, 6, -1) == "", &
76-
'function slice failed', warn=.false.)
77-
call check(slice(test_string, stride=-1) == "zyxwvutsrqponmlkjihgfedcba", &
78-
'function slice failed', warn=.false.)
79-
call check(slice(test_string, 7, 7, -4) == "g", &
80-
'function slice failed', warn=.false.)
81-
call check(slice(test_char, 7, 7, 3) == "g", &
82-
'function slice failed', warn=.false.)
83-
call check(slice(test_string, 7, 7, 3) == "g", &
84-
'function slice failed', warn=.false.)
85-
call check(slice(test_char, 7, -10) == "gfedcba", &
86-
'function slice failed', warn=.false.)
87-
call check(slice(test_string, 500, 22) == "zyxwv", &
88-
'function slice failed', warn=.false.)
89-
call check(slice(test_char, 50, 27) == "", &
90-
'function slice failed', warn=.false.)
91-
call check(slice(test_string, -20, -200) == "", &
92-
'function slice failed', warn=.false.)
93-
call check(slice(test_char, first=0, stride=-1) == "", &
94-
'function slice failed', warn=.false.)
95-
call check(slice(test_string, last=27, stride=-2) == "", &
96-
'function slice failed', warn=.false.)
97-
call check(slice(test_char, first=27, stride=2) == "", &
98-
'function slice failed', warn=.false.)
99-
call check(slice(test_string, -500, 500) == "abcdefghijklmnopqrstuvwxyz", &
100-
'function slice failed', warn=.false.)
101-
102-
test_string = ""
103-
test_char = ""
104-
call check(slice(test_string, 2, 16, 3) == "", &
105-
'function slice failed', warn=.false.)
106-
call check(slice(test_char, 2, 16, 3) == "", &
107-
'function slice failed', warn=.false.)
108-
109-
end subroutine test_slice_string
110-
11159
subroutine test_slice_gen
11260
character(len=*), parameter :: test = &
11361
& "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
@@ -244,7 +192,6 @@ program tester
244192
call test_to_title_string
245193
call test_to_sentence_string
246194
call test_reverse_string
247-
call test_slice_string
248195
call test_slice_gen
249196

250197
end program tester

0 commit comments

Comments
 (0)