Commit 43df951d authored by Henderson, Shane's avatar Henderson, Shane
Browse files

DBC filetype_fortran/simplify filetype_input

parent b9c0cbbd
Pipeline #159108 passed with stage
in 2 minutes and 2 seconds
...@@ -373,7 +373,7 @@ MODULE CommandLineProcessor ...@@ -373,7 +373,7 @@ MODULE CommandLineProcessor
ENDDO ENDDO
ENDIF ENDIF
ELSE ELSE
CALL GET_COMMAND(cmdline,cmdlinelength,ierr) CALL GET_COMMAND(cmdline,cmdlinelength,ierr)
IF(ierr /= 0) CALL clp%e%raiseError(modName//'::'//myName// & IF(ierr /= 0) CALL clp%e%raiseError(modName//'::'//myName// &
' - problem getting command line.') ' - problem getting command line.')
clp%narg=nFields(cmdline)-1 clp%narg=nFields(cmdline)-1
......
This diff is collapsed.
...@@ -68,8 +68,6 @@ PUBLIC :: InputFileType ...@@ -68,8 +68,6 @@ PUBLIC :: InputFileType
!> Module name for error messages !> Module name for error messages
CHARACTER(LEN=*),PARAMETER :: modName='FILETYPE_INPUT' CHARACTER(LEN=*),PARAMETER :: modName='FILETYPE_INPUT'
!> Scratch variable for IOSTAT values
INTEGER(SIK) :: ioerr
!> @brief Derived type object for an input file, it is an extension of the !> @brief Derived type object for an input file, it is an extension of the
!> @ref FileType_Fortran "FortranFileType" object. !> @ref FileType_Fortran "FortranFileType" object.
...@@ -85,12 +83,6 @@ TYPE,EXTENDS(FortranFileType) :: InputFileType ...@@ -85,12 +83,6 @@ TYPE,EXTENDS(FortranFileType) :: InputFileType
LOGICAL(SBK),PRIVATE :: echostat=.FALSE. LOGICAL(SBK),PRIVATE :: echostat=.FALSE.
!> Unit number for the file to echo result of fgetl to. !> Unit number for the file to echo result of fgetl to.
INTEGER(SIK),PRIVATE :: echounit=-1 INTEGER(SIK),PRIVATE :: echounit=-1
!> The first character of oneline
CHARACTER(LEN=1),PRIVATE :: probe=''
!> The first character of the line before the line that was just read
CHARACTER(LEN=1),PRIVATE :: lastprobe=''
!
!List of type bound procedures (methods) for the Input File type
CONTAINS CONTAINS
!> @copybrief FileType_Input::init_inp_file !> @copybrief FileType_Input::init_inp_file
!> @copydetails FileType_Input::init_inp_file !> @copydetails FileType_Input::init_inp_file
...@@ -113,15 +105,6 @@ TYPE,EXTENDS(FortranFileType) :: InputFileType ...@@ -113,15 +105,6 @@ TYPE,EXTENDS(FortranFileType) :: InputFileType
!> @copybrief FileType_Input::getEchoUnit_inp_file !> @copybrief FileType_Input::getEchoUnit_inp_file
!> @copydetails FileType_Input::getEchoUnit_inp_file !> @copydetails FileType_Input::getEchoUnit_inp_file
PROCEDURE,PASS :: getEchoUnit => getEchoUnit_inp_file PROCEDURE,PASS :: getEchoUnit => getEchoUnit_inp_file
!> @copybrief FileType_Input::getProbe_inp_file
!> @copydetails FileType_Input::getProbe_inp_file
PROCEDURE,PASS :: getProbe => getProbe_inp_file
!> @copybrief FileType_Input::rewind_inp_file
!> @copydetails FileType_Input::rewind_inp_file
PROCEDURE,PASS :: frewind => rewind_inp_file
!> @copybrief FileType_Input::backspace_inp_file
!> @copydetails FileType_Input::backspace_inp_file
PROCEDURE,PASS :: fbackspace => backspace_inp_file
ENDTYPE InputFileType ENDTYPE InputFileType
! !
...@@ -176,31 +159,6 @@ SUBROUTINE init_inp_file(fileobj,unit,file,status,access,form, & ...@@ -176,31 +159,6 @@ SUBROUTINE init_inp_file(fileobj,unit,file,status,access,form, &
ENDSUBROUTINE init_inp_file ENDSUBROUTINE init_inp_file
! !
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
!> @brief Rewinds an Input file
!> @param file input file object.
!>
!> This is needed to reset probe.
!>
SUBROUTINE rewind_inp_file(file)
CLASS(InputFileType),INTENT(INOUT) :: file
file%probe=''
file%lastprobe=''
CALL rewind_fortran_file(file)
ENDSUBROUTINE rewind_inp_file
!
!-------------------------------------------------------------------------------
!> @brief Backspaces an Input file
!> @param file input file object.
!>
!> This is needed to maintain the correct value for probe.
!>
SUBROUTINE backspace_inp_file(file)
CLASS(InputFileType),INTENT(INOUT) :: file
CALL backspace_fortran_file(file)
file%probe=file%lastprobe
ENDSUBROUTINE backspace_inp_file
!
!-------------------------------------------------------------------------------
!> @brief Clears the log file object and resets its state to the unitialized !> @brief Clears the log file object and resets its state to the unitialized
!> state. !> state.
!> @param file input file object. !> @param file input file object.
...@@ -211,8 +169,6 @@ SUBROUTINE clear_inp_file(file,ldel) ...@@ -211,8 +169,6 @@ SUBROUTINE clear_inp_file(file,ldel)
LOGICAL(SBK) :: bool LOGICAL(SBK) :: bool
file%echounit=-1 file%echounit=-1
file%echostat=.FALSE. file%echostat=.FALSE.
file%probe=''
file%lastprobe=''
bool=.FALSE. bool=.FALSE.
IF(PRESENT(ldel)) bool=ldel IF(PRESENT(ldel)) bool=ldel
CALL clear_fortran_file(file,bool) CALL clear_fortran_file(file,bool)
...@@ -227,9 +183,10 @@ SUBROUTINE read_oneline_inp_file(file,oneline) ...@@ -227,9 +183,10 @@ SUBROUTINE read_oneline_inp_file(file,oneline)
CHARACTER(LEN=*),PARAMETER :: myName='READ_ONELINE_INP_FILE' CHARACTER(LEN=*),PARAMETER :: myName='READ_ONELINE_INP_FILE'
CLASS(InputFileType),INTENT(INOUT) :: file CLASS(InputFileType),INTENT(INOUT) :: file
TYPE(StringType),INTENT(OUT) :: oneline TYPE(StringType),INTENT(OUT) :: oneline
!
CHARACTER(LEN=256) :: buffer CHARACTER(LEN=256) :: buffer
CHARACTER(LEN=4) :: sioerr,sunit CHARACTER(LEN=4) :: sioerr,sunit
INTEGER(SIK) :: buffer_size,eioerr INTEGER(SIK) :: buffer_size,eioerr,ioerr
ioerr=0 ioerr=0
IF(file%isOpen() .AND. .NOT.file%isEOF()) THEN IF(file%isOpen() .AND. .NOT.file%isEOF()) THEN
...@@ -243,7 +200,6 @@ SUBROUTINE read_oneline_inp_file(file,oneline) ...@@ -243,7 +200,6 @@ SUBROUTINE read_oneline_inp_file(file,oneline)
ELSEIF(ioerr == IOSTAT_EOR) THEN ELSEIF(ioerr == IOSTAT_EOR) THEN
!Done reading line. Append last buffer to oneline. !Done reading line. Append last buffer to oneline.
oneline=oneline//TRIM(buffer) oneline=oneline//TRIM(buffer)
file%lastprobe=file%probe
IF(file%echostat) THEN IF(file%echostat) THEN
WRITE(UNIT=file%echounit,FMT='(a)',IOSTAT=eioerr) TRIM(oneline) WRITE(UNIT=file%echounit,FMT='(a)',IOSTAT=eioerr) TRIM(oneline)
IF(eioerr /= 0) THEN IF(eioerr /= 0) THEN
...@@ -267,10 +223,7 @@ SUBROUTINE read_oneline_inp_file(file,oneline) ...@@ -267,10 +223,7 @@ SUBROUTINE read_oneline_inp_file(file,oneline)
ENDIF ENDIF
ENDDO ENDDO
ENDIF ENDIF
IF(LEN(oneline) > 0) THEN IF(.NOT.(LEN(oneline) > 0)) THEN
file%probe=oneline%at(1)
ELSE
file%probe=''
oneline=' ' oneline=' '
ENDIF ENDIF
ENDSUBROUTINE read_oneline_inp_file ENDSUBROUTINE read_oneline_inp_file
...@@ -310,7 +263,7 @@ SUBROUTINE setEchoUnit_inp_file(file,iunit) ...@@ -310,7 +263,7 @@ SUBROUTINE setEchoUnit_inp_file(file,iunit)
CHARACTER(LEN=*),PARAMETER :: myName='SETECHOUNIT_INP_FILE' CHARACTER(LEN=*),PARAMETER :: myName='SETECHOUNIT_INP_FILE'
CLASS(InputFileType),INTENT(INOUT) :: file CLASS(InputFileType),INTENT(INOUT) :: file
INTEGER(SIK),INTENT(IN) :: iunit INTEGER(SIK),INTENT(IN) :: iunit
IF(0 < iunit .AND. iunit /= OUTPUT_UNIT .AND. iunit /= ERROR_UNIT) THEN IF(0 < iunit .AND. ANY(iunit /= [OUTPUT_UNIT,ERROR_UNIT,INPUT_UNIT])) THEN
file%echounit=iunit file%echounit=iunit
ELSE ELSE
CALL file%e%raiseError('Incorrect input to '//modName//'::'// & CALL file%e%raiseError('Incorrect input to '//modName//'::'// &
...@@ -330,18 +283,4 @@ PURE FUNCTION getEchoUnit_inp_file(file) RESULT(iunit) ...@@ -330,18 +283,4 @@ PURE FUNCTION getEchoUnit_inp_file(file) RESULT(iunit)
iunit=file%echounit iunit=file%echounit
ENDFUNCTION getEchoUnit_inp_file ENDFUNCTION getEchoUnit_inp_file
! !
!-------------------------------------------------------------------------------
!> @brief Returns the value of the PROBE attribute of the input file type
!> object.
!> @param file the input file object
!> @returns c the value of file%probe
!>
PURE FUNCTION getProbe_inp_file(file) RESULT(c)
CLASS(InputFileType),INTENT(IN) :: file
CHARACTER(LEN=1) :: c
c=file%probe
ENDFUNCTION getProbe_inp_file
!
ENDMODULE FileType_Input ENDMODULE FileType_Input
...@@ -408,15 +408,15 @@ SUBROUTINE countOccurrences_SchElm(this,inputFile,firstLine,lastLine,firstField, ...@@ -408,15 +408,15 @@ SUBROUTINE countOccurrences_SchElm(this,inputFile,firstLine,lastLine,firstField,
REQUIRE(fstLine >= 0 .AND. fstLine <= lstLine) REQUIRE(fstLine >= 0 .AND. fstLine <= lstLine)
REQUIRE(fstField >= 0 .AND. fstField <= lstField) REQUIRE(fstField >= 0 .AND. fstField <= lstField)
iline=0 iline=1
this%nOccurrences=0 this%nOccurrences=0
DO WHILE(.NOT.atEndOfFile(inputFile)) CALL inputfile%fgetl(line)
CALL inputfile%fgetl(line) DO WHILE(.NOT.(inputFile%isEOF() .OR. line%at(1) == DOT))
CALL stripComment(line) CALL stripComment(line)
iline=iline+1 iline=iline+1
IF(iline > lstLine) EXIT IF(iline > lstLine) EXIT
IF(iline >= fstLine) THEN IF(iline >= fstLine) THEN
IF(atContentLine(inputFile)) THEN IF(line%at(1) /= BANG .AND. line%at(1) /= DOT) THEN
sttField=1; IF(iline == fstLine) sttField=MAX(fstField,sttField) sttField=1; IF(iline == fstLine) sttField=MAX(fstField,sttField)
stpField=nFields(line); IF(iline == lstLine) stpField=MIN(lstField,stpField) stpField=nFields(line); IF(iline == lstLine) stpField=MIN(lstField,stpField)
DO ifield=sttField,stpField DO ifield=sttField,stpField
...@@ -425,6 +425,7 @@ SUBROUTINE countOccurrences_SchElm(this,inputFile,firstLine,lastLine,firstField, ...@@ -425,6 +425,7 @@ SUBROUTINE countOccurrences_SchElm(this,inputFile,firstLine,lastLine,firstField,
ENDDO ENDDO
ENDIF ENDIF
ENDIF ENDIF
CALL inputfile%fgetl(line)
ENDDO ENDDO
CALL inputfile%frewind() CALL inputfile%frewind()
ENDSUBROUTINE countOccurrences_SchElm ENDSUBROUTINE countOccurrences_SchElm
...@@ -471,15 +472,15 @@ SUBROUTINE determineExtentsWithinTextFile_SchElm(this,inputFile,validElements,fi ...@@ -471,15 +472,15 @@ SUBROUTINE determineExtentsWithinTextFile_SchElm(this,inputFile,validElements,fi
IF(ALLOCATED(this%lastField)) DEALLOCATE(this%lastField); ALLOCATE(this%lastField(this%nOccurrences)) IF(ALLOCATED(this%lastField)) DEALLOCATE(this%lastField); ALLOCATE(this%lastField(this%nOccurrences))
ioccur=0 ioccur=0
iline=0 iline=1
readingThisElement=.FALSE. readingThisElement=.FALSE.
DO WHILE(.NOT.atEndOfFile(inputFile)) CALL inputfile%fgetl(line)
CALL inputfile%fgetl(line) DO WHILE(.NOT.(inputFile%isEOF() .OR. line%at(1) == DOT))
CALL stripComment(line) CALL stripComment(line)
iline=iline+1 iline=iline+1
IF(iline > lstLine) EXIT IF(iline > lstLine) EXIT
IF(iline >= fstLine) THEN IF(iline >= fstLine) THEN
IF(atContentLine(inputFile)) THEN IF(line%at(1) /= BANG .AND. line%at(1) /= DOT) THEN
sttField=1; IF(iline == fstLine) sttField=MAX(fstField,sttField) sttField=1; IF(iline == fstLine) sttField=MAX(fstField,sttField)
stpField=nFields(line); IF(iline == lstLine) stpField=MIN(lstField,stpField) stpField=nFields(line); IF(iline == lstLine) stpField=MIN(lstField,stpField)
DO ifield=sttField,stpField DO ifield=sttField,stpField
...@@ -499,6 +500,7 @@ SUBROUTINE determineExtentsWithinTextFile_SchElm(this,inputFile,validElements,fi ...@@ -499,6 +500,7 @@ SUBROUTINE determineExtentsWithinTextFile_SchElm(this,inputFile,validElements,fi
ENDIF ENDIF
ENDIF ENDIF
IF(readingThisElement) this%lastLine(ioccur)=iline IF(readingThisElement) this%lastLine(ioccur)=iline
CALL inputfile%fgetl(line)
ENDDO ENDDO
CALL inputfile%frewind() CALL inputfile%frewind()
ENDSUBROUTINE determineExtentsWithinTextFile_SchElm ENDSUBROUTINE determineExtentsWithinTextFile_SchElm
...@@ -682,16 +684,17 @@ SUBROUTINE parse_SchPar(this,inputFile,paramList) ...@@ -682,16 +684,17 @@ SUBROUTINE parse_SchPar(this,inputFile,paramList)
REQUIRE(inputFile%isOpen()) REQUIRE(inputFile%isOpen())
!Ensure no line in the input file exceeds the max line limit !Ensure no line in the input file exceeds the max line limit
DO WHILE(.NOT.atEndOfFile(inputFile)) CALL inputfile%fgetl(line)
CALL inputfile%fgetl(line) DO WHILE(.NOT.(inputFile%isEOF() .OR. line%at(1) == DOT))
CALL stripComment(line) CALL stripComment(line)
IF(atContentLine(inputFile)) THEN IF(line%at(1) /= BANG .AND. line%at(1) /= DOT) THEN
IF(LEN(line)>MAX_LINE_LEN) THEN IF(LEN(line)>MAX_LINE_LEN) THEN
CALL eSchemaParser%raiseError(modName//'::'//myName// & CALL eSchemaParser%raiseError(modName//'::'//myName// &
' - "A content line exceeds the max line limit of '//str(MAX_LINE_LEN)//' characters') ' - "A content line exceeds the max line limit of '//str(MAX_LINE_LEN)//' characters')
RETURN RETURN
ENDIF ENDIF
ENDIF ENDIF
CALL inputfile%fgetl(line)
ENDDO ENDDO
CALL inputfile%frewind() CALL inputfile%frewind()
...@@ -889,15 +892,15 @@ SUBROUTINE parse_SchCrd(this,inputFile,paramList,ioccurCrd,pListPathBlk) ...@@ -889,15 +892,15 @@ SUBROUTINE parse_SchCrd(this,inputFile,paramList,ioccurCrd,pListPathBlk)
nEntries=SIZE(this%entry) nEntries=SIZE(this%entry)
ALLOCATE(entryStr(nEntries)) ALLOCATE(entryStr(nEntries))
entryStr='' entryStr=''
iline=0 iline=1
ientry=1 ientry=1
DO WHILE(.NOT.atEndOfFile(inputFile)) CALL inputfile%fgetl(line)
CALL inputfile%fgetl(line) DO WHILE(.NOT.(inputFile%isEOF() .OR. line%at(1) == DOT))
CALL stripComment(line) CALL stripComment(line)
iline=iline+1 iline=iline+1
IF(iline > lstLine) EXIT IF(iline > lstLine) EXIT
IF(iline >= fstLine) THEN IF(iline >= fstLine) THEN
IF(atContentLine(inputFile)) THEN IF(line%at(1) /= BANG .AND. line%at(1) /= DOT) THEN
sttField=1; IF(iline == fstLine) sttField=MAX(fstField+1,sttField) sttField=1; IF(iline == fstLine) sttField=MAX(fstField+1,sttField)
stpField=nFields(line); IF(iline == lstLine) stpField=MIN(lstField,stpField) stpField=nFields(line); IF(iline == lstLine) stpField=MIN(lstField,stpField)
DO ifield=sttField,stpField DO ifield=sttField,stpField
...@@ -910,6 +913,7 @@ SUBROUTINE parse_SchCrd(this,inputFile,paramList,ioccurCrd,pListPathBlk) ...@@ -910,6 +913,7 @@ SUBROUTINE parse_SchCrd(this,inputFile,paramList,ioccurCrd,pListPathBlk)
ENDDO ENDDO
ENDIF ENDIF
ENDIF ENDIF
CALL inputfile%fgetl(line)
ENDDO ENDDO
CALL inputfile%frewind() CALL inputfile%frewind()
...@@ -1318,32 +1322,6 @@ FUNCTION findElementByName(elements,name) RESULT(index) ...@@ -1318,32 +1322,6 @@ FUNCTION findElementByName(elements,name) RESULT(index)
ENDFUNCTION findElementByName ENDFUNCTION findElementByName
! !
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
!> @brief Determines if the input text file line is currently at End of the File
!> @param file the file currently being read
!> @param isEOF logical determining whether or not the file is at End of File
!>
FUNCTION atEndOfFile(file) RESULT(isEOF)
TYPE(InputFileType),INTENT(IN) :: file
LOGICAL(SBK) :: isEOF
REQUIRE(file%isOpen())
isEOF=file%isEOF() .OR. file%getProbe() == DOT
ENDFUNCTION atEndOfFile
!
!-------------------------------------------------------------------------------
!> @brief Determines if the input text file line contains readable content
!> @param file the file currently being read
!> @param hasContent logical determining whether or not the file has content
!>
FUNCTION atContentLine(file) RESULT(hasContent)
TYPE(InputFileType),INTENT(IN) :: file
LOGICAL(SBK) :: hasContent
REQUIRE(file%isOpen())
hasContent=file%getProbe() /= BANG .AND. file%getProbe() /= DOT
ENDFUNCTION atContentLine
!
!-------------------------------------------------------------------------------
!> @brief Checks to see if entry string is empty !> @brief Checks to see if entry string is empty
!> @param string the string to be checked !> @param string the string to be checked
!> @param isEmpty logical corresponding to if the entry string is empty !> @param isEmpty logical corresponding to if the entry string is empty
......
...@@ -54,11 +54,6 @@ SUBROUTINE testFortranFileType() ...@@ -54,11 +54,6 @@ SUBROUTINE testFortranFileType()
!Called for coverage/error checking !Called for coverage/error checking
COMPONENT_TEST('%initialize()') COMPONENT_TEST('%initialize()')
CALL testFile%fopen()
CALL testFile%fclose()
CALL testFile%fdelete()
CALL testFile%frewind()
CALL testFile%fbackspace()
CALL testFile%initialize(UNIT=OUTPUT_UNIT,FILE='./testFile.txt',STATUS='OOPS',& CALL testFile%initialize(UNIT=OUTPUT_UNIT,FILE='./testFile.txt',STATUS='OOPS',&
ACCESS='OOPS',FORM='OOPS',POSITION='OOPS',ACTION='OOPS',PAD='OOPS',RECL=-1) ACCESS='OOPS',FORM='OOPS',POSITION='OOPS',ACTION='OOPS',PAD='OOPS',RECL=-1)
CALL testFile%initialize(UNIT=ERROR_UNIT,FILE='./testFile.txt',STATUS='OLD',& CALL testFile%initialize(UNIT=ERROR_UNIT,FILE='./testFile.txt',STATUS='OLD',&
...@@ -97,34 +92,21 @@ SUBROUTINE testFortranFileType() ...@@ -97,34 +92,21 @@ SUBROUTINE testFortranFileType()
ASSERT(testFile%isOpen(),'testFile%fopen()') ASSERT(testFile%isOpen(),'testFile%fopen()')
!Coverage/Error checking !Coverage/Error checking
CALL testFile%fopen()
CALL testFile2%initialize(UNIT=12,FILE='./testFile.txt') CALL testFile2%initialize(UNIT=12,FILE='./testFile.txt')
CALL testFile%setStatus('NEW')
CALL e%setStopOnError(.TRUE.)
CALL testFile%fbackspace()
CALL testFile%frewind()
CALL e%setStopOnError(.FALSE.)
CALL testFile%fclose() CALL testFile%fclose()
ASSERT(.NOT.(testFile%isOpen()),'%fclose()') ASSERT(.NOT.(testFile%isOpen()),'%fclose()')
CALL testFile%fdelete() CALL testFile%fdelete()
INQUIRE(FILE='./testFile.txt',EXIST=lexist) INQUIRE(FILE='./testFile.txt',EXIST=lexist)
ASSERT(.NOT.lexist,'%fdelete()') ASSERT(.NOT.lexist,'%fdelete()')
CALL testFile%clear()
!Coverage/Error checking !Coverage/Error checking
CALL testFile%fclose()
CALL testFile%fbackspace()
CALL testFile%frewind()
CALL testFile%setOpenStat(.TRUE.)
CALL testFile%fbackspace()
CALL testFile%frewind()
CALL testFile%initialize(UNIT=12,FILE='./testFile.txt')
CALL testFile2%initialize(UNIT=13,FILE='./testFile2',ACCESS='DIRECT', & CALL testFile2%initialize(UNIT=13,FILE='./testFile2',ACCESS='DIRECT', &
STATUS='NEW',FORM='UNFORMATTED',RECL=100*NUMERIC_STORAGE_SIZE, & STATUS='NEW',FORM='UNFORMATTED',RECL=100*NUMERIC_STORAGE_SIZE, &
ACTION='WRITE') ACTION='WRITE')
CALL testFile2%fopen() CALL testFile2%fopen()
CALL testFile2%fdelete() CALL testFile2%fdelete()
CALL testFile%clear()
CALL testFile%e%addSurrogate(e) CALL testFile%e%addSurrogate(e)
CALL testFile%initialize(UNIT=12,FILE='./testFile.txt',STATUS='OLD', & CALL testFile%initialize(UNIT=12,FILE='./testFile.txt',STATUS='OLD', &
ACCESS='DIRECT',ACTION='READ',RECL=100,FORM='FORMATTED') ACCESS='DIRECT',ACTION='READ',RECL=100,FORM='FORMATTED')
......
...@@ -57,12 +57,7 @@ SUBROUTINE testInputFileType() ...@@ -57,12 +57,7 @@ SUBROUTINE testInputFileType()
CALL testInpFile%fopen() CALL testInpFile%fopen()
CALL testInpFile%fgetl(string) CALL testInpFile%fgetl(string)
ASSERT(TRIM(string) == 'sample oneline 1','%fgetl()') ASSERT(TRIM(string) == 'sample oneline 1','%fgetl()')
ASSERT(testInpFile%getProbe() == 's','%getProbe()')
CALL testInpFile%frewind() CALL testInpFile%frewind()
ASSERT(LEN_TRIM(testInpFile%getProbe()) == 0,'%frewind()')
CALL testInpFile%fgetl(string)
CALL testInpFile%fbackspace()
ASSERT(LEN_TRIM(testInpFile%getProbe()) == 0,'%fbackspace()')
CALL testFile%clear(.TRUE.) CALL testFile%clear(.TRUE.)
CALL testInpFile%setEchoStat(.FALSE.) CALL testInpFile%setEchoStat(.FALSE.)
CALL testInpFile%fgetl(string) CALL testInpFile%fgetl(string)
......
...@@ -57,9 +57,6 @@ ENDSUBROUTINE SetupError ...@@ -57,9 +57,6 @@ ENDSUBROUTINE SetupError
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
SUBROUTINE testClear() SUBROUTINE testClear()
!Test clear !Test clear
CALL testVTUFile%fopen()
testVTUFile%hasMesh=.TRUE.
!
CALL testVTUFile%clear() CALL testVTUFile%clear()
ASSERT(.NOT.testVTUFile%isInit(),'isInit()') ASSERT(.NOT.testVTUFile%isInit(),'isInit()')
ASSERT(.NOT.testVTUFile%isOpen(),'isOpen()') ASSERT(.NOT.testVTUFile%isOpen(),'isOpen()')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment