summaryrefslogtreecommitdiff
path: root/styles_test.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-07-05 00:03:56 +0800
committerxuri <xuri.me@gmail.com>2021-07-05 00:03:56 +0800
commit544ef18a8cb9949fcb8833c6d2816783c90f3318 (patch)
tree88bb3eaa9d92522d3b5c4eeb052210c26bc4c99f /styles_test.go
parent0e02329bedf6648259fd219642bb907bdb07fd21 (diff)
- Support concurrency iterate rows and columns
- Rename exported field `File.XLSX` to `File.Pkg` - Exported error message
Diffstat (limited to 'styles_test.go')
-rw-r--r--styles_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/styles_test.go b/styles_test.go
index e2eed1d..5d452f6 100644
--- a/styles_test.go
+++ b/styles_test.go
@@ -201,7 +201,7 @@ func TestNewStyle(t *testing.T) {
_, err = f.NewStyle(&Style{})
assert.NoError(t, err)
_, err = f.NewStyle(Style{})
- assert.EqualError(t, err, "invalid parameter type")
+ assert.EqualError(t, err, ErrParameterInvalid.Error())
_, err = f.NewStyle(&Style{Font: &Font{Family: strings.Repeat("s", MaxFontFamilyLength+1)}})
assert.EqualError(t, err, "the length of the font family name must be smaller than or equal to 31")
@@ -261,14 +261,14 @@ func TestStylesReader(t *testing.T) {
f := NewFile()
// Test read styles with unsupported charset.
f.Styles = nil
- f.XLSX["xl/styles.xml"] = MacintoshCyrillicCharset
+ f.Pkg.Store("xl/styles.xml", MacintoshCyrillicCharset)
assert.EqualValues(t, new(xlsxStyleSheet), f.stylesReader())
}
func TestThemeReader(t *testing.T) {
f := NewFile()
// Test read theme with unsupported charset.
- f.XLSX["xl/theme/theme1.xml"] = MacintoshCyrillicCharset
+ f.Pkg.Store("xl/theme/theme1.xml", MacintoshCyrillicCharset)
assert.EqualValues(t, new(xlsxTheme), f.themeReader())
}