...

Source file src/github.com/godbus/dbus/v5/match_test.go

Documentation: github.com/godbus/dbus/v5

     1  package dbus
     2  
     3  import "testing"
     4  
     5  func TestFormatMatchOptions(t *testing.T) {
     6  	opts := []MatchOption{
     7  		withMatchType("signal"),
     8  		WithMatchSender("org.bluez"),
     9  		WithMatchInterface("org.freedesktop.DBus.Properties"),
    10  		WithMatchMember("PropertiesChanged"),
    11  		WithMatchPathNamespace("/org/bluez/hci0"),
    12  	}
    13  	want := "type='signal',sender='org.bluez'," +
    14  		"interface='org.freedesktop.DBus.Properties'," +
    15  		"member='PropertiesChanged',path_namespace='/org/bluez/hci0'"
    16  	if have := formatMatchOptions(opts); have != want {
    17  		t.Fatalf("formatMatchOptions(%v) = %q, want %q", opts, have, want)
    18  	}
    19  }
    20  

View as plain text