Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gosqlite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gosqlite
Commits
5947a457
Commit
5947a457
authored
May 27, 2018
by
gwenn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ineffassign warnings
parent
716de451
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
meta_test.go
meta_test.go
+6
-6
stmt_test.go
stmt_test.go
+1
-1
No files found.
meta_test.go
View file @
5947a457
...
...
@@ -48,7 +48,7 @@ func TestTables(t *testing.T) {
checkNoError
(
t
,
err
,
"error looking for tables: %s"
)
assert
.
Equal
(
t
,
0
,
len
(
tables
),
"table count"
)
tables
,
err
=
db
.
Tables
(
"bim"
)
_
,
err
=
db
.
Tables
(
"bim"
)
assert
.
T
(
t
,
err
!=
nil
,
"error expected"
)
//println(err.Error())
}
...
...
@@ -88,7 +88,7 @@ func TestIndexes(t *testing.T) {
assert
.
T
(
t
,
ok
,
"no index"
)
assert
.
Equalf
(
t
,
"test"
,
tbl
,
"got: %s; want: %s"
,
tbl
,
"test"
)
indexes
,
err
=
db
.
Indexes
(
"main"
)
_
,
err
=
db
.
Indexes
(
"main"
)
checkNoError
(
t
,
err
,
"error looking for indexes: %s"
)
_
,
err
=
db
.
Indexes
(
"temp"
)
...
...
@@ -111,7 +111,7 @@ func TestColumns(t *testing.T) {
column
:=
columns
[
2
]
assert
.
Equal
(
t
,
"int_num"
,
column
.
Name
,
"column name"
)
columns
,
err
=
db
.
Columns
(
"main"
,
"test"
)
_
,
err
=
db
.
Columns
(
"main"
,
"test"
)
checkNoError
(
t
,
err
,
"error listing columns: %s"
)
_
,
err
=
db
.
Columns
(
"bim"
,
"test"
)
...
...
@@ -141,7 +141,7 @@ func TestForeignKeys(t *testing.T) {
t
.
Errorf
(
"unexpected FK data: %#v"
,
fk
)
}
fks
,
err
=
db
.
ForeignKeys
(
"main"
,
"child"
)
_
,
err
=
db
.
ForeignKeys
(
"main"
,
"child"
)
checkNoError
(
t
,
err
,
"error listing FKs: %s"
)
_
,
err
=
db
.
ForeignKeys
(
"bim"
,
"child"
)
...
...
@@ -176,9 +176,9 @@ func TestTableIndexes(t *testing.T) {
column
:=
columns
[
0
]
assert
.
Equal
(
t
,
"a_string"
,
column
.
Name
,
"column name"
)
indexes
,
err
=
db
.
TableIndexes
(
"main"
,
"test"
)
_
,
err
=
db
.
TableIndexes
(
"main"
,
"test"
)
checkNoError
(
t
,
err
,
"error listing indexes: %s"
)
columns
,
err
=
db
.
IndexColumns
(
"main"
,
"test_index"
)
_
,
err
=
db
.
IndexColumns
(
"main"
,
"test_index"
)
checkNoError
(
t
,
err
,
"error listing index columns: %s"
)
_
,
err
=
db
.
TableIndexes
(
"bim"
,
"test"
)
...
...
stmt_test.go
View file @
5947a457
...
...
@@ -665,7 +665,7 @@ func TestBindAndScanReflect(t *testing.T) {
type
Amount
float64
var
amount
Amount
null
,
err
=
s
.
ScanReflect
(
0
,
&
amount
)
_
,
err
=
s
.
ScanReflect
(
0
,
&
amount
)
checkNoError
(
t
,
err
,
"scan error: %s"
)
assert
.
Equal
(
t
,
Amount
(
1
),
amount
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment