From dfec358c75eb32070885d4eb4cfbbb99948fc558 Mon Sep 17 00:00:00 2001 From: mattn Date: Wed, 29 Jan 2014 09:02:22 +0900 Subject: [PATCH] Add test for error == nil --- error_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/error_test.go b/error_test.go index bf7bb3c..b61085d 100644 --- a/error_test.go +++ b/error_test.go @@ -8,6 +8,12 @@ import ( "testing" ) +func TestSimpleError(t *testing.T) { + if ErrWarning.Error() != "" { + t.Error("wrong error code for corrupted DB") + } +} + func TestCorruptDbErrors(t *testing.T) { dirName, err := ioutil.TempDir("", "sqlite3") if err != nil {