Skip to content

Commit 86e0e89

Browse files
committed
fix: add tests to type conversions
Signed-off-by: mikeee <[email protected]>
1 parent 8a79f83 commit 86e0e89

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

client/state_test.go

+6
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,24 @@ func TestTypes(t *testing.T) {
3434
t.Run("test operation types", func(t *testing.T) {
3535
var a OperationType = -1
3636
assert.Equal(t, UndefinedType, a.String())
37+
a = 1
38+
assert.Equal(t, UpsertType, a.String())
3739
a = 2
3840
assert.Equal(t, DeleteType, a.String())
3941
})
4042
t.Run("test state concurrency type", func(t *testing.T) {
4143
var b StateConcurrency = -1
4244
assert.Equal(t, UndefinedType, b.String())
45+
b = 1
46+
assert.Equal(t, FirstWriteType, b.String())
4347
b = 2
4448
assert.Equal(t, LastWriteType, b.String())
4549
})
4650
t.Run("test state consistency type", func(t *testing.T) {
4751
var c StateConsistency = -1
4852
assert.Equal(t, UndefinedType, c.String())
53+
c = 1
54+
assert.Equal(t, EventualType, c.String())
4955
c = 2
5056
assert.Equal(t, StrongType, c.String())
5157
})

0 commit comments

Comments
 (0)