diff options
author | xuri <xuri.me@gmail.com> | 2020-05-10 16:56:08 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2020-05-10 16:56:08 +0800 |
commit | 882abb80988b7c50286dd2e6c6589fab10662db6 (patch) | |
tree | 49f88c0a3ed045a61519a318c67e0551d247c52e /styles_test.go | |
parent | 4188dc7a4a650200c697fd47ad28ba346bf786a6 (diff) |
- formula engine: reduce cyclomatic complexity
- styles: allow empty and default cell formats, #628
Diffstat (limited to 'styles_test.go')
-rw-r--r-- | styles_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/styles_test.go b/styles_test.go index 5681c95..1ff0e4e 100644 --- a/styles_test.go +++ b/styles_test.go @@ -33,9 +33,9 @@ func TestStyleFill(t *testing.T) { styles := xl.stylesReader() style := styles.CellXfs.Xf[styleID] if testCase.expectFill { - assert.NotEqual(t, style.FillID, 0, testCase.label) + assert.NotEqual(t, *style.FillID, 0, testCase.label) } else { - assert.Equal(t, style.FillID, 0, testCase.label) + assert.Equal(t, *style.FillID, 0, testCase.label) } } } @@ -188,7 +188,7 @@ func TestNewStyle(t *testing.T) { assert.NoError(t, err) styles := f.stylesReader() fontID := styles.CellXfs.Xf[styleID].FontID - font := styles.Fonts.Font[fontID] + font := styles.Fonts.Font[*fontID] assert.Contains(t, *font.Name.Val, "Times New Roman", "Stored font should contain font name") assert.Equal(t, 2, styles.CellXfs.Count, "Should have 2 styles") _, err = f.NewStyle(&Style{}) |