- Update unit tests
This commit is contained in:
parent
29366fd126
commit
0447cb22c8
|
@ -5136,8 +5136,11 @@ func (nf *numberFormat) positiveHandler() string {
|
|||
var fmtNum bool
|
||||
for _, token := range nf.section[nf.sectionIdx].Items {
|
||||
if token.TType == nfp.TokenTypeGeneral {
|
||||
if isNum, precision, _ := isNumeric(nf.value); isNum && precision > 11 {
|
||||
return strconv.FormatFloat(nf.number, 'G', 10, 64)
|
||||
}
|
||||
return nf.value
|
||||
}
|
||||
if inStrSlice(supportedNumberTokenTypes, token.TType, true) != -1 {
|
||||
fmtNum = true
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ func TestNumFmt(t *testing.T) {
|
|||
for _, item := range [][]string{
|
||||
{"123", "general", "123"},
|
||||
{"-123", ";general", "-123"},
|
||||
{"12345678901", "General", "12345678901"},
|
||||
{"43543.5448726851", "General", "43543.54487"},
|
||||
{"-43543.5448726851", "General", "-43543.54487"},
|
||||
{"1234567890.12345", "General", "1234567890"},
|
||||
|
|
Loading…
Reference in New Issue