aboutsummaryrefslogtreecommitdiffstats
path: root/reader/reader_test.go
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2019-11-03 21:33:41 +0000
committerMatthew Lemon <lemon@matthewlemon.com>2019-11-03 21:33:41 +0000
commit29ba5464c10d681b39f8e65b07f533d8f43f1b45 (patch)
treefab298330fbe68eba0b005414cdd7b65853d9ef1 /reader/reader_test.go
parentb86942c3eaf0ad7670b03b432f17c721c836adef (diff)
implemented alphas - producing letter component of Excel columns horizontally
Diffstat (limited to 'reader/reader_test.go')
-rw-r--r--reader/reader_test.go18
1 files changed, 17 insertions, 1 deletions
diff --git a/reader/reader_test.go b/reader/reader_test.go
index 563f2fc..fe58445 100644
--- a/reader/reader_test.go
+++ b/reader/reader_test.go
@@ -42,8 +42,21 @@ func TestReadXLSX(t *testing.T) {
_ = ReadXLSX("testdata/test_template.xlsx") // TODO: remove temp blank
}
+func TestAlphaSingle(t *testing.T) {
+ as := alphaSingle()
+ if as[0] != "A" {
+ t.Errorf("Expected A, got %v", as[0])
+ }
+ if as[1] != "B" {
+ t.Errorf("Expected B, got %v", as[1])
+ }
+ if as[25] != "Z" {
+ t.Errorf("Expected Z, got %v", as[25])
+ }
+}
+
func TestAlphas(t *testing.T) {
- as := alphas()
+ as := alphas(2)
if as[0] != "A" {
t.Errorf("Expected A, got %v", as[0])
}
@@ -53,5 +66,8 @@ func TestAlphas(t *testing.T) {
if as[26] != "AA" {
t.Errorf("Expected AA, got %v", as[26])
}
+ if as[52] != "BA" {
+ t.Errorf("Expected BA, got %v", as[52])
+ }
}