From 5e5d088a3662a12104630827ac6926f7626d23cf Mon Sep 17 00:00:00 2001 From: mattn Date: Mon, 18 Aug 2014 16:56:31 +0900 Subject: Add license header --- error_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'error_test.go') diff --git a/error_test.go b/error_test.go index e21f215..6a8660d 100644 --- a/error_test.go +++ b/error_test.go @@ -1,3 +1,7 @@ +// Copyright (C) 2014 Yasuhiro Matsumoto . +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file. package sqlite3 import ( -- cgit v1.2.3 From 6535341da906b68a836904b742145b409e961a56 Mon Sep 17 00:00:00 2001 From: mattn Date: Mon, 18 Aug 2014 17:00:59 +0900 Subject: Add one blank line for godoc --- backup.go | 1 + error.go | 1 + error_test.go | 1 + sqlite3.go | 1 + sqlite3_test.go | 1 + sqlite3_windows.go | 1 + 6 files changed, 6 insertions(+) (limited to 'error_test.go') diff --git a/backup.go b/backup.go index 9e79c60..4b2a72d 100644 --- a/backup.go +++ b/backup.go @@ -2,6 +2,7 @@ // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. + package sqlite3 /* diff --git a/error.go b/error.go index 59b5051..b910108 100644 --- a/error.go +++ b/error.go @@ -2,6 +2,7 @@ // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. + package sqlite3 import "C" diff --git a/error_test.go b/error_test.go index 6a8660d..a006188 100644 --- a/error_test.go +++ b/error_test.go @@ -2,6 +2,7 @@ // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. + package sqlite3 import ( diff --git a/sqlite3.go b/sqlite3.go index 1683a48..aac71ad 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -2,6 +2,7 @@ // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. + package sqlite3 /* diff --git a/sqlite3_test.go b/sqlite3_test.go index 0f10780..581d289 100644 --- a/sqlite3_test.go +++ b/sqlite3_test.go @@ -2,6 +2,7 @@ // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. + package sqlite3 import ( diff --git a/sqlite3_windows.go b/sqlite3_windows.go index c5565e9..269c05a 100644 --- a/sqlite3_windows.go +++ b/sqlite3_windows.go @@ -2,6 +2,7 @@ // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. + package sqlite3 /* -- cgit v1.2.3 From a528a3085290a55613949f2cd363e6fd57bf67ee Mon Sep 17 00:00:00 2001 From: mattn Date: Mon, 26 Jan 2015 18:36:21 +0900 Subject: Add test for ErrNo.Extend() --- error_test.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'error_test.go') diff --git a/error_test.go b/error_test.go index a006188..1ccbe5b 100644 --- a/error_test.go +++ b/error_test.go @@ -231,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) + } } } -- cgit v1.2.3