aboutsummaryrefslogtreecommitdiff
path: root/error_test.go
diff options
context:
space:
mode:
authorPhilip O'Toole <philip.otoole@yahoo.com>2016-02-23 01:18:14 -0500
committerPhilip O'Toole <philip.otoole@yahoo.com>2016-02-23 01:18:14 -0500
commit3e97a4ca68500045276a2ba7051740bd53e40d06 (patch)
treed984cc8023dffd95fd37fc6ed293ba80f973592a /error_test.go
parentMerge pull request #134 from antoine-lizee/patch-1 (diff)
parentMerge pull request #267 from ianlancetaylor/go16 (diff)
downloadgolite-3e97a4ca68500045276a2ba7051740bd53e40d06.tar.gz
golite-3e97a4ca68500045276a2ba7051740bd53e40d06.tar.xz
Merge pull request #1 from mattn/master
Bring master up-to-date
Diffstat (limited to 'error_test.go')
-rw-r--r--error_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/error_test.go b/error_test.go
index e21f215..1ccbe5b 100644
--- a/error_test.go
+++ b/error_test.go
@@ -1,3 +1,8 @@
+// Copyright (C) 2014 Yasuhiro Matsumoto <mattn.jp@gmail.com>.
+//
+// Use of this source code is governed by an MIT-style
+// license that can be found in the LICENSE file.
+
package sqlite3
import (
@@ -226,6 +231,12 @@ func TestExtendedErrorCodes_Unique(t *testing.T) {
t.Errorf("Wrong extended error code: %d != %d",
sqliteErr.ExtendedCode, ErrConstraintUnique)
}
+ extended := sqliteErr.Code.Extend(3).Error()
+ expected := "constraint failed"
+ if extended != expected {
+ t.Errorf("Wrong basic error code: %q != %q",
+ extended, expected)
+ }
}
}