Skip to content

Commit

Permalink
ir: fix go vet issues in test cases
Browse files Browse the repository at this point in the history
	ir/inst_aggregate_test.go:16:10: result of (github.com/llir/llvm/ir/value.Value).String call not used
	ir/inst_aggregate_test.go:18:10: result of (github.com/llir/llvm/ir/value.Value).String call not used
	ir/inst_aggregate_test.go:20:10: result of (github.com/llir/llvm/ir/value.Value).String call not used
	ir/inst_conversion_test.go:42:17: result of (*github.com/llir/llvm/ir.InstTrunc).String call not used
  • Loading branch information
mewmew committed Jul 2, 2019
1 parent 1ea001c commit 39d20e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ir/inst_aggregate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ func TestTypeCheckInstExtractValue(t *testing.T) {

// Should succeed.
var v value.Value = constant.NewUndef(structType)
v.String()
_ = v.String()
v = NewInsertValue(v, constant.NewInt(types.I32, 1), 0)
v.String()
_ = v.String()
v = NewInsertValue(v, constant.NewInt(types.I64, 1), 1)
v.String()
_ = v.String()

var panicErr error
func() {
Expand Down
2 changes: 1 addition & 1 deletion ir/inst_conversion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestTypeCheckTrunc(t *testing.T) {
func() {
defer func() { panicErr = recover().(error) }()
trunc := NewTrunc(zeroVal, c.toTyp)
trunc.String()
_ = trunc.String()
panic(errOK)
}()
got := panicErr.Error()
Expand Down

0 comments on commit 39d20e5

Please sign in to comment.