A case of reading of a very small value was skipped, for example: 2.
1219957909652723e-314.
Fixed in XmlMDataStd_RealArrayDriver.cxx and XmlMDataStd_RealListDriver.cxx
// A test file bug29452.xml is extended to check this skipped case.
" for RealArray attribute as \"")
+ aValueStr + "\"";
myMessageDriver->Send (aMessageString, Message_Warning);
+ // skip the first space, if exists
+ while (*aValueStr != 0 && IsSpace (*aValueStr))
+ ++aValueStr;
// skip to the next space separator
- while (*aValueStr != 0 && ! IsSpace (*aValueStr)) ++aValueStr;
+ while (*aValueStr != 0 && ! IsSpace (*aValueStr))
+ ++aValueStr;
}
aRealArray->SetValue(ind, aValue);
}
" for RealList attribute as \"")
+ aValueStr + "\"";
myMessageDriver->Send(aMessageString, Message_Warning);
+ // skip the first space, if exists
+ while (*aValueStr != 0 && IsSpace (*aValueStr))
+ ++aValueStr;
// skip to the next space separator
- while (*aValueStr != 0 && ! IsSpace (*aValueStr)) ++aValueStr;
+ while (*aValueStr != 0 && !IsSpace (*aValueStr))
+ ++aValueStr;
}
aRealList->Append(aValue);
}
set real [GetReal D 0:1]
set rlst [GetRealList D 0:1]
set rarr [GetRealArray D 0:1]
+set rarr2 [GetRealArray D 0:2]
# Check for read values
checkreal "Real value" [lindex $rlst 0] 1.1 0 1e-15
checkreal "Real value" [lindex $rarr 0] 0.111 0 1e-15
checkreal "Real value" [lindex $rarr 3] 123. 0 1e-15
checkreal "Real value" [lindex $rarr 4] 3.14e12 0 1e-15
+checkreal "Real value" [lindex $rarr2 0] 2 0 1e-15
+checkreal "Real value" [lindex $rarr2 1] 2.1219957909652723e-314 0 1e-15
+checkreal "Real value" [lindex $rarr2 2] 5 0 1e-15
foreach inf [list $real [lindex $rlst 3]] {
if { [string compare "$inf" "inf"] &&
[string compare "$inf" "infinity"] &&