mirror of
https://github.com/rclone/rclone.git
synced 2025-08-10 14:17:58 +02:00
fs: add IsSet convenience method to Bits
This commit is contained in:
@ -80,6 +80,15 @@ func TestBitsSet(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestBitsIsSet(t *testing.T) {
|
||||
b := bitA | bitB
|
||||
assert.True(t, b.IsSet(bitA))
|
||||
assert.True(t, b.IsSet(bitB))
|
||||
assert.True(t, b.IsSet(bitA|bitB))
|
||||
assert.False(t, b.IsSet(bitC))
|
||||
assert.False(t, b.IsSet(bitA|bitC))
|
||||
}
|
||||
|
||||
func TestBitsType(t *testing.T) {
|
||||
f := bits(0)
|
||||
assert.Equal(t, "Bits", f.Type())
|
||||
|
Reference in New Issue
Block a user