Skip to content

Commit

Permalink
Merge pull request go-gst#125 from ArtemMartus/test_void_return_emit
Browse files Browse the repository at this point in the history
Test void return on emit
  • Loading branch information
RSWilli authored Sep 6, 2024
2 parents 49f720b + 52fc6d9 commit c7a74aa
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions gst/gst_element_emit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,24 @@ func TestSignalEmitSimpleReturnValue(t *testing.T) {
}
}

func TestSignalEmitVoidReturnValue(t *testing.T) {
gst.Init(nil)

elem, err := gst.NewElement("splitmuxsink")
if err != nil {
t.Fatal(err)
}

result, err := elem.Emit("split-after")
if err != nil {
t.Fatal("Result must be nil due to void return type, unless splitmux api changed" +
err.Error())
}
if result != nil {
t.Fatal("Result must be nil due to void return type, unless splitmux api changed")
}
}

func TestSignalEmitGObjectReturnValue(t *testing.T) {
gst.Init(nil)

Expand Down

0 comments on commit c7a74aa

Please sign in to comment.