|
1 | 1 | module test_filesystem
|
2 | 2 | use testdrive, only : new_unittest, unittest_type, error_type, check, skip_test
|
3 | 3 | 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 |
5 | 5 |
|
6 | 6 | implicit none
|
7 | 7 |
|
@@ -30,13 +30,15 @@ subroutine test_FS_ERROR(error)
|
30 | 30 | msg = "code - 10, Cannot create File temp.txt - File already exists"
|
31 | 31 | s1 = FS_ERROR_CODE(10, "Cannot create File temp.txt -", "File already exists")
|
32 | 32 |
|
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") |
34 | 35 | if (allocated(error)) return
|
35 | 36 |
|
36 | 37 | msg = "Cannot create File temp.txt - File already exists"
|
37 | 38 | s2 = FS_ERROR("Cannot create File temp.txt -", "File already exists")
|
38 | 39 |
|
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") |
40 | 42 | if (allocated(error)) return
|
41 | 43 | end subroutine test_FS_ERROR
|
42 | 44 |
|
|
0 commit comments