Skip to content

Commit 5197a0c

Browse files
committed
update test
1 parent e182803 commit 5197a0c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/system/test_filesystem.f90

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module test_filesystem
22
use testdrive, only : new_unittest, unittest_type, error_type, check, skip_test
33
use stdlib_system, only: is_directory, delete_file, FS_ERROR, FS_ERROR_CODE
4-
use stdlib_error, only: state_type
4+
use stdlib_error, only: state_type, STDLIB_FS_ERROR
55

66
implicit none
77

@@ -30,13 +30,15 @@ subroutine test_FS_ERROR(error)
3030
msg = "code - 10, Cannot create File temp.txt - File already exists"
3131
s1 = FS_ERROR_CODE(10, "Cannot create File temp.txt -", "File already exists")
3232

33-
call check(error, s1%message == msg, "FS_ERROR: Could not construct message with code correctly")
33+
call check(error, s1%state == STDLIB_FS_ERROR .and. s1%message == msg, &
34+
"FS_ERROR: Could not construct the state with code correctly")
3435
if (allocated(error)) return
3536

3637
msg = "Cannot create File temp.txt - File already exists"
3738
s2 = FS_ERROR("Cannot create File temp.txt -", "File already exists")
3839

39-
call check(error, s2%message == msg, "FS_ERROR: Could not construct message without code correctly")
40+
call check(error, s2%state == STDLIB_FS_ERROR .and. s2%message == msg, &
41+
"FS_ERROR: Could not construct state without code correctly")
4042
if (allocated(error)) return
4143
end subroutine test_FS_ERROR
4244

0 commit comments

Comments
 (0)