diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2019-10-25 11:10:40 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2019-10-25 11:10:40 +0100 |
commit | 03073b44eaa801afc2faad7175669c2ee377838d (patch) | |
tree | c094638c54213764e25a6d178beb9df5e91fc0d5 /reader/reader_test.go | |
parent | e9aa53ccc3572bd17c22a3aa99851863cd2bde82 (diff) |
added test and some cleanup
Diffstat (limited to 'reader/reader_test.go')
-rw-r--r-- | reader/reader_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/reader/reader_test.go b/reader/reader_test.go index ba3172e..a7dd281 100644 --- a/reader/reader_test.go +++ b/reader/reader_test.go @@ -22,3 +22,18 @@ func TestReadDML(t *testing.T) { t.Errorf("dmlData[0].Sheet = %s; want Introduction", dmlData[0].Key) } } + +func TestNoFileReturnsError(t *testing.T) { + _, err := ReadDML("/home/bobbins.csv") + // if we get no error, something has gone wrong + if err == nil { + t.Errorf("Should have thrown error %s", err) + } +} + +func TestBadDMLLine(t *testing.T) { + _, err := ReadDML("/home/lemon/code/python/bcompiler-engine/tests/resources/datamap_empty_cols.csv") + if err != nil { + t.Errorf("This will trigger") + } +} |