summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSharsie <Sharsie@users.noreply.github.com>2017-01-11 20:43:31 +0100
committerGitHub <noreply@github.com>2017-01-11 20:43:31 +0100
commit57fc2943ff6e1b2f062daafc6d03d9fc05bfe896 (patch)
treec080f0c9ae957637db85a5c63e8104eb6b176dfa
parent670a58791208d64d045a68f56dafab58f292c13e (diff)
Add tests for the default cell value
-rw-r--r--excelize_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/excelize_test.go b/excelize_test.go
index 7848ed9..cd03cff 100644
--- a/excelize_test.go
+++ b/excelize_test.go
@@ -21,7 +21,9 @@ func TestExcelize(t *testing.T) {
}
t.Log("\r\n")
}
- f1.UpdateLinkedValue()
+ f1.UpdateLinkedValue()
+ f1.SetCellDefault("SHEET2", "A1", strconv.FormatFloat(float64(100.1588), 'f', -1, 32))
+ f1.SetCellDefault("SHEET2", "A1", strconv.FormatFloat(float64(-100.1588), 'f', -1, 64))
f1.SetCellInt("SHEET2", "A1", 100)
f1.SetCellStr("SHEET2", "C11", "Knowns")
f1.NewSheet(3, "Maximum 31 characters allowed in sheet title.")
@@ -47,6 +49,8 @@ func TestExcelize(t *testing.T) {
f1.SetCellValue("Sheet2", "F2", int16(42))
f1.SetCellValue("Sheet2", "F2", int32(42))
f1.SetCellValue("Sheet2", "F2", int64(42))
+ f1.SetCellValue("Sheet2", "F2", float32(42.65418))
+ f1.SetCellValue("Sheet2", "F2", float64(-42.65418))
f1.SetCellValue("Sheet2", "F2", float32(42))
f1.SetCellValue("Sheet2", "F2", float64(42))
f1.SetCellValue("Sheet2", "G2", nil)