@@ -147,6 +147,8 @@ SUBROUTINE FTValueClassTests
147
147
CALL FTAssertEqual(DBLE (3.14 ),v % doublePrecisionValue(),doubleTol,msg= " Double return for real object" )
148
148
s = v % stringValue()
149
149
CALL FTAssertEqual(" 3.140000" ,s(1 :8 )," String return for real object" )
150
+ s = v % stringValue(8 )
151
+ CALL FTAssertEqual(" 3.140000" ,s(1 :8 )," String return for real object" )
150
152
CALL FTAssertEqual(.true. ,v % logicalValue()," Logical return for real object" )
151
153
!
152
154
! ----------------------------------------------------------------
@@ -168,6 +170,7 @@ SUBROUTINE FTValueClassTests
168
170
CALL FTAssertEqual(666 ,v % integerValue()," Integer storage to integer" )
169
171
CALL FTAssertEqual(DBLE (666.0 ),v % doublePrecisionValue(),doubleTol,msg= " Integer storage to double" )
170
172
CALL FTAssertEqual(" 666" ,v % stringValue()," Integer storage to string" )
173
+ CALL FTAssertEqual(" 666" ,v % stringValue(3 )," Integer storage to string" )
171
174
CALL FTAssertEqual(.true. ,v % logicalValue()," Integer storage to logical" )
172
175
!
173
176
! ------------------------------------------
@@ -190,6 +193,8 @@ SUBROUTINE FTValueClassTests
190
193
CALL FTAssertEqual(d,v % doublePrecisionValue(),doubleTol,msg= " Double storage to double" )
191
194
s = v % stringValue()
192
195
CALL FTAssertEqual(" 0.33333333333333" ,s(1 :16 )," Double storage to string" )
196
+ s = v % stringValue(16 )
197
+ CALL FTAssertEqual(" 0.33333333333333" ,s(1 :16 )," Double storage to string" )
193
198
CALL FTAssertEqual(.true. ,v % logicalValue()," Double storage to logical" )
194
199
!
195
200
! -----------------------------------------------
@@ -284,6 +289,9 @@ SUBROUTINE FTValueClassTests
284
289
CALL FTAssertEqual(expectedValue = " stringValue" , &
285
290
actualValue = vFromObj % stringValue(), &
286
291
msg = " Check that cast is correct" )
292
+ CALL FTAssertEqual(expectedValue = " stringValue" , &
293
+ actualValue = vFromObj % stringValue(11 ), &
294
+ msg = " Check that cast is correct" )
287
295
!
288
296
! ---------------
289
297
! Test bad values
0 commit comments