You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
630B

  1. package excelize
  2. import (
  3. "testing"
  4. "github.com/stretchr/testify/assert"
  5. )
  6. func TestNewInvalidColNameError(t *testing.T) {
  7. assert.EqualError(t, newInvalidColumnNameError("A"), "invalid column name \"A\"")
  8. assert.EqualError(t, newInvalidColumnNameError(""), "invalid column name \"\"")
  9. }
  10. func TestNewInvalidRowNumberError(t *testing.T) {
  11. assert.EqualError(t, newInvalidRowNumberError(0), "invalid row number 0")
  12. }
  13. func TestNewInvalidCellNameError(t *testing.T) {
  14. assert.EqualError(t, newInvalidCellNameError("A"), "invalid cell name \"A\"")
  15. assert.EqualError(t, newInvalidCellNameError(""), "invalid cell name \"\"")
  16. }