mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 01:08:33 +00:00
vprotogen refine (#717)
* Update all proto files with existing vprotogen * Chore: remove protoc-gen-gofast * Feat: vprotogen adds version detector to block generation code from old protobuf version * Feat: vprotogen refine logic Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
This commit is contained in:
parent
00bcd40c34
commit
42d158bd85
63 changed files with 455 additions and 800 deletions
|
@ -52,7 +52,11 @@ func TestRequestSerialization(t *testing.T) {
|
|||
if r := cmp.Diff(actualRequest, expectedRequest, cmp.AllowUnexported(protocol.ID{})); r != "" {
|
||||
t.Error(r)
|
||||
}
|
||||
if r := cmp.Diff(actualAddons, expectedAddons); r != "" {
|
||||
|
||||
addonsComparer := func(x, y *Addons) bool {
|
||||
return (x.Flow == y.Flow) && (cmp.Equal(x.Seed, y.Seed))
|
||||
}
|
||||
if r := cmp.Diff(actualAddons, expectedAddons, cmp.Comparer(addonsComparer)); r != "" {
|
||||
t.Error(r)
|
||||
}
|
||||
}
|
||||
|
@ -120,7 +124,11 @@ func TestMuxRequest(t *testing.T) {
|
|||
if r := cmp.Diff(actualRequest, expectedRequest, cmp.AllowUnexported(protocol.ID{})); r != "" {
|
||||
t.Error(r)
|
||||
}
|
||||
if r := cmp.Diff(actualAddons, expectedAddons); r != "" {
|
||||
|
||||
addonsComparer := func(x, y *Addons) bool {
|
||||
return (x.Flow == y.Flow) && (cmp.Equal(x.Seed, y.Seed))
|
||||
}
|
||||
if r := cmp.Diff(actualAddons, expectedAddons, cmp.Comparer(addonsComparer)); r != "" {
|
||||
t.Error(r)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue