Skip to content

chore: upgrade tailscale to v1.46.1 #8913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! chore: update golang.org/x/exp/slices
  • Loading branch information
coadler committed Aug 4, 2023
commit 1992d1ff52569502f55de824f2d3aaf7c43833a1
4 changes: 3 additions & 1 deletion coderd/util/slice/slice.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package slice

import "golang.org/x/exp/constraints"
import (
"golang.org/x/exp/constraints"
)

// SameElements returns true if the 2 lists have the same elements in any
// order.
Expand Down
16 changes: 16 additions & 0 deletions coderd/util/slice/slice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,19 @@ func assertSetContains[T comparable](t *testing.T, set []T, in []T, out []T) {
require.False(t, slice.Contains(set, e), "expect element in set")
}
}

func TestAscending(t *testing.T) {
t.Parallel()

assert.Equal(t, -1, slice.Ascending(1, 2))
assert.Equal(t, 0, slice.Ascending(1, 1))
assert.Equal(t, 1, slice.Ascending(2, 1))
}

func TestDescending(t *testing.T) {
t.Parallel()

assert.Equal(t, 1, slice.Ascending(1, 2))
assert.Equal(t, 0, slice.Ascending(1, 1))
assert.Equal(t, -1, slice.Ascending(2, 1))
}