From 94f197c4fe6531f96a42fe4e960c1c921a3ee0e8 Mon Sep 17 00:00:00 2001 From: xuri Date: Sat, 19 Mar 2022 00:05:47 +0800 Subject: This improved formula calculate precision and added zero placeholder number format support --- numfmt_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'numfmt_test.go') diff --git a/numfmt_test.go b/numfmt_test.go index 80534e9..7dc3f77 100644 --- a/numfmt_test.go +++ b/numfmt_test.go @@ -996,6 +996,14 @@ func TestNumFmt(t *testing.T) { {"44896.18957170139", "[$-435]mmmmm dd yyyy h:mm AM/PM", "D 01 2022 4:32 AM"}, {"text_", "General", "text_"}, {"text_", "\"=====\"@@@\"--\"@\"----\"", "=====text_text_text_--text_----"}, + {"0.0450685976001E+21", "0_);[Red]\\(0\\)", "45068597600100000000"}, + {"8.0450685976001E+21", "0_);[Red]\\(0\\)", "8045068597600100000000"}, + {"8.0450685976001E-21", "0_);[Red]\\(0\\)", "0"}, + {"8.04506", "0_);[Red]\\(0\\)", "8"}, + {"-0.0450685976001E+21", "0_);[Red]\\(0\\)", "(45068597600100000000)"}, + {"-8.0450685976001E+21", "0_);[Red]\\(0\\)", "(8045068597600100000000)"}, + {"-8.0450685976001E-21", "0_);[Red]\\(0\\)", "(0)"}, + {"-8.04506", "0_);[Red]\\(0\\)", "(8)"}, } { result := format(item[0], item[1]) assert.Equal(t, item[2], result, item) -- cgit v1.2.1