mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Update vendor dependencies
This commit is contained in:
parent
34a3fe426b
commit
459bb4531f
747 changed files with 89857 additions and 39711 deletions
34
vendor/golang.org/x/net/http2/flow_test.go
generated
vendored
34
vendor/golang.org/x/net/http2/flow_test.go
generated
vendored
|
@ -49,5 +49,39 @@ func TestFlowAdd(t *testing.T) {
|
|||
if f.add(1) {
|
||||
t.Fatal("adding 1 to max shouldn't be allowed")
|
||||
}
|
||||
}
|
||||
|
||||
func TestFlowAddOverflow(t *testing.T) {
|
||||
var f flow
|
||||
if !f.add(0) {
|
||||
t.Fatal("failed to add 0")
|
||||
}
|
||||
if !f.add(-1) {
|
||||
t.Fatal("failed to add -1")
|
||||
}
|
||||
if !f.add(0) {
|
||||
t.Fatal("failed to add 0")
|
||||
}
|
||||
if !f.add(1) {
|
||||
t.Fatal("failed to add 1")
|
||||
}
|
||||
if !f.add(1) {
|
||||
t.Fatal("failed to add 1")
|
||||
}
|
||||
if !f.add(0) {
|
||||
t.Fatal("failed to add 0")
|
||||
}
|
||||
if !f.add(-3) {
|
||||
t.Fatal("failed to add -3")
|
||||
}
|
||||
if got, want := f.available(), int32(-2); got != want {
|
||||
t.Fatalf("size = %d; want %d", got, want)
|
||||
}
|
||||
if !f.add(1<<31 - 1) {
|
||||
t.Fatal("failed to add 2^31-1")
|
||||
}
|
||||
if got, want := f.available(), int32(1+-3+(1<<31-1)); got != want {
|
||||
t.Fatalf("size = %d; want %d", got, want)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue