diff options
author | xuri <xuri.me@gmail.com> | 2022-09-11 00:04:04 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2022-09-11 00:04:04 +0800 |
commit | b6cc43d8242fd3f7f0c6163db9fcd759b9b992b1 (patch) | |
tree | 3bf1b4b6d37f006ced435931a8aad10d2e652a24 /excelize_test.go | |
parent | c72fb747b8a64117538229f1e5a85d220349b6f1 (diff) |
This makes 6 functions concurrency safety
- These 6 functions now support concurrency safe: SetColWidth, GetColWidth, SetColVisible, GetColVisible, SetColStyle and GetColStyle
Diffstat (limited to 'excelize_test.go')
-rw-r--r-- | excelize_test.go | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/excelize_test.go b/excelize_test.go index 93cd2bf..9d60b1c 100644 --- a/excelize_test.go +++ b/excelize_test.go @@ -1201,14 +1201,26 @@ func TestHSL(t *testing.T) { assert.Equal(t, 0.0, hueToRGB(0, 0, 1.0/7)) assert.Equal(t, 0.0, hueToRGB(0, 0, 0.4)) assert.Equal(t, 0.0, hueToRGB(0, 0, 2.0/4)) - t.Log(RGBToHSL(255, 255, 0)) - h, s, l := RGBToHSL(0, 255, 255) + h, s, l := RGBToHSL(255, 255, 0) + assert.Equal(t, 0.16666666666666666, h) + assert.Equal(t, 1.0, s) + assert.Equal(t, 0.5, l) + h, s, l = RGBToHSL(0, 255, 255) assert.Equal(t, 0.5, h) assert.Equal(t, 1.0, s) assert.Equal(t, 0.5, l) - t.Log(RGBToHSL(250, 100, 50)) - t.Log(RGBToHSL(50, 100, 250)) - t.Log(RGBToHSL(250, 50, 100)) + h, s, l = RGBToHSL(250, 100, 50) + assert.Equal(t, 0.041666666666666664, h) + assert.Equal(t, 0.9523809523809524, s) + assert.Equal(t, 0.5882352941176471, l) + h, s, l = RGBToHSL(50, 100, 250) + assert.Equal(t, 0.625, h) + assert.Equal(t, 0.9523809523809524, s) + assert.Equal(t, 0.5882352941176471, l) + h, s, l = RGBToHSL(250, 50, 100) + assert.Equal(t, 0.9583333333333334, h) + assert.Equal(t, 0.9523809523809524, s) + assert.Equal(t, 0.5882352941176471, l) } func TestProtectSheet(t *testing.T) { |