@@ -380,6 +380,29 @@ func TestStreamSetCellValFunc(t *testing.T) {
380
380
}
381
381
}
382
382
383
+ func TestSetCellIntFunc (t * testing.T ) {
384
+ cases := []struct {
385
+ val interface {}
386
+ target string
387
+ }{
388
+ {val : 128 , target : "128" },
389
+ {val : int8 (- 128 ), target : "-128" },
390
+ {val : int16 (- 32768 ), target : "-32768" },
391
+ {val : int32 (- 2147483648 ), target : "-2147483648" },
392
+ {val : int64 (- 9223372036854775808 ), target : "-9223372036854775808" },
393
+ {val : uint (128 ), target : "128" },
394
+ {val : uint8 (255 ), target : "255" },
395
+ {val : uint16 (65535 ), target : "65535" },
396
+ {val : uint32 (4294967295 ), target : "4294967295" },
397
+ {val : uint64 (18446744073709551615 ), target : "18446744073709551615" },
398
+ }
399
+ for _ , c := range cases {
400
+ cell := & xlsxC {}
401
+ setCellIntFunc (cell , c .val )
402
+ assert .Equal (t , c .target , cell .V )
403
+ }
404
+ }
405
+
383
406
func TestStreamWriterOutlineLevel (t * testing.T ) {
384
407
file := NewFile ()
385
408
streamWriter , err := file .NewStreamWriter ("Sheet1" )
0 commit comments