Skip to content

Commit

Permalink
slight simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
deosjr committed Dec 7, 2023
1 parent 76fab1f commit 53113ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion uatest/custom_codec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@ func TestCallMethodWithEncodeFunc(t *testing.T) {
if !ok {
return nil, fmt.Errorf("expected extensionobject")
}
// if we have ExtensionObjects for both ExtraComplex and Complex objects sharing the same nodeID,
// then this function will get called for both. Hence the if-statement
if ec, ok := e.Value.(*ExtraComplex); ok {
e.Value = &Complex{ec.i, ec.j}
return e.Encode()
}
return ua.DefaultEncodeExtensionObject(e)
}
Expand Down

0 comments on commit 53113ce

Please sign in to comment.