Skip to content

Commit 2ea6e4b

Browse files
committed
Logical return
Fix logical return and add test for it.
1 parent 6ae13df commit 2ea6e4b

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

Source/FTObjects/FTValueClass.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,9 +707,9 @@ FUNCTION stringValueR(self,requestedLength) RESULT(s)
707707
CASE (FTVALUECLASS_LOGICAL)
708708
l = TRANSFER(self % valueStorage, l)
709709
IF ( l ) THEN
710-
s = "TRUE"
710+
s = ".true."
711711
ELSE
712-
s = "FALSE"
712+
s = ".false."
713713
END IF
714714
END SELECT
715715

Testing/Tests/ValueClassTests.f90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ SUBROUTINE FTValueClassTests
242242
CALL FTAssertEqual(expectedValue = logicalToStr(j), &
243243
actualValue = v % stringValue(), &
244244
msg = "String value from logical:"// logicalToStr(j))
245+
CALL FTAssertEqual(expectedValue = logicalToStr(j), &
246+
actualValue = v % stringValue(7), &
247+
msg = "String value from logical:"// logicalToStr(j))
245248
CALL FTAssertEqual(expectedValue = logicalToReal(j), &
246249
actualValue = v % realValue(), &
247250
relTol = 2.0*EPSILON(x), &

0 commit comments

Comments
 (0)