dbus: replace test suffix * with +
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
parent
cf182d1fbe
commit
342c66aae8
|
@ -33,7 +33,7 @@ var samples = []dbusTestCase{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"org.chromium.Chromium*", &dbus.Config{
|
"org.chromium.Chromium+", &dbus.Config{
|
||||||
See: nil,
|
See: nil,
|
||||||
Talk: []string{"org.freedesktop.Avahi", "org.freedesktop.UPower"},
|
Talk: []string{"org.freedesktop.Avahi", "org.freedesktop.UPower"},
|
||||||
Own: nil,
|
Own: nil,
|
||||||
|
@ -141,19 +141,19 @@ func testCaseGenerate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// skip already enumerated system bus test
|
// skip already enumerated system bus test
|
||||||
if tc.id[len(tc.id)-1] == '*' {
|
if tc.id[len(tc.id)-1] == '+' {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
ftp := [2]dbusTestCase{tc}
|
ftp := [2]dbusTestCase{tc}
|
||||||
|
|
||||||
// system proxy tests always place directly after its user counterpart with id ending in *
|
// system proxy tests always place directly after its user counterpart with id ending in +
|
||||||
if i+1 < len(testCasesV) && testCasesV[i+1].id[len(testCasesV[i+1].id)-1] == '*' {
|
if i+1 < len(testCasesV) && testCasesV[i+1].id[len(testCasesV[i+1].id)-1] == '+' {
|
||||||
// attach system bus config
|
// attach system bus config
|
||||||
ftp[1] = testCasesV[i+1]
|
ftp[1] = testCasesV[i+1]
|
||||||
|
|
||||||
// check for misplaced/mismatching tests
|
// check for misplaced/mismatching tests
|
||||||
if ftp[0].wantErr != ftp[1].wantErr || ftp[0].id+"*" != ftp[1].id {
|
if ftp[0].wantErr != ftp[1].wantErr || ftp[0].id+"+" != ftp[1].id {
|
||||||
panic("mismatching session/system pairing")
|
panic("mismatching session/system pairing")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue