From 882abb80988b7c50286dd2e6c6589fab10662db6 Mon Sep 17 00:00:00 2001 From: xuri Date: Sun, 10 May 2020 16:56:08 +0800 Subject: - formula engine: reduce cyclomatic complexity - styles: allow empty and default cell formats, #628 --- styles_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'styles_test.go') 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{}) -- cgit v1.2.1