2021-09-09 12:25:25 +00:00
|
|
|
//go:build !plan9 && !solaris && !js
|
2021-08-20 17:05:14 +00:00
|
|
|
// +build !plan9,!solaris,!js
|
2018-09-11 01:55:06 +00:00
|
|
|
|
|
|
|
package azureblob
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
|
|
|
func (f *Fs) InternalTest(t *testing.T) {
|
|
|
|
// Check first feature flags are set on this
|
|
|
|
// remote
|
2018-09-18 12:25:20 +00:00
|
|
|
enabled := f.Features().SetTier
|
2018-09-11 01:55:06 +00:00
|
|
|
assert.True(t, enabled)
|
|
|
|
enabled = f.Features().GetTier
|
|
|
|
assert.True(t, enabled)
|
|
|
|
}
|
2020-05-13 20:29:21 +00:00
|
|
|
|
|
|
|
func TestIncrement(t *testing.T) {
|
|
|
|
for _, test := range []struct {
|
|
|
|
in []byte
|
|
|
|
want []byte
|
|
|
|
}{
|
|
|
|
{[]byte{0, 0, 0, 0}, []byte{1, 0, 0, 0}},
|
|
|
|
{[]byte{0xFE, 0, 0, 0}, []byte{0xFF, 0, 0, 0}},
|
|
|
|
{[]byte{0xFF, 0, 0, 0}, []byte{0, 1, 0, 0}},
|
|
|
|
{[]byte{0, 1, 0, 0}, []byte{1, 1, 0, 0}},
|
|
|
|
{[]byte{0xFF, 0xFF, 0xFF, 0xFE}, []byte{0, 0, 0, 0xFF}},
|
|
|
|
{[]byte{0xFF, 0xFF, 0xFF, 0xFF}, []byte{0, 0, 0, 0}},
|
|
|
|
} {
|
|
|
|
increment(test.in)
|
|
|
|
assert.Equal(t, test.want, test.in)
|
|
|
|
}
|
|
|
|
}
|