Skip to content

Commit

Permalink
Merge pull request #84 from make-software/bugfix/CMW-1060/type-fixes
Browse files Browse the repository at this point in the history
Fix Tuple3 constructor (CMW-1060)
  • Loading branch information
koltsov-iv authored Apr 24, 2024
2 parents 6ec1a0a + 3c61da1 commit cf263a3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions tests/types/cl_value/tuple3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,11 @@ func Test_FromBytesByType_Tuple3U32ToVal(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, "(10, 11, 12)", res.String())
}

func Test_NewCLTuple3(t *testing.T) {
val1 := clvalue.NewCLUInt32(10)
val2 := clvalue.NewCLUInt32(11)
val3 := clvalue.NewCLUInt32(12)
res := clvalue.NewCLTuple3(*val1, *val2, *val3)
assert.Equal(t, "(10, 11, 12)", res.String())
}
2 changes: 1 addition & 1 deletion types/clvalue/tuple3.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func NewCLTuple3(val1 CLValue, val2 CLValue, val3 CLValue) CLValue {
innerType: tupleType,
Inner1: val1,
Inner2: val2,
Inner3: val2,
Inner3: val3,
}}
}

Expand Down

0 comments on commit cf263a3

Please sign in to comment.