Skip to content

Commit

Permalink
assert dictionary size
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent committed Apr 23, 2024
1 parent 8faed59 commit 5504380
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions migrations/entitlements/migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3311,6 +3311,8 @@ func TestRehash(t *testing.T) {
optType.ID(),
)

assert.Equal(t, 1, dictValue.Count())

value, ok := dictValue.Get(inter, locationRange, typeValue)
require.True(t, ok)

Expand Down
6 changes: 6 additions & 0 deletions migrations/statictypes/intersection_type_migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,8 @@ func TestIntersectionTypeRehash(t *testing.T) {
intersectionType.ID(),
)

assert.Equal(t, 1, dictValue.Count())

value, ok := dictValue.Get(inter, locationRange, typeValue)
require.True(t, ok)

Expand Down Expand Up @@ -800,6 +802,8 @@ func TestRehashNestedIntersectionType(t *testing.T) {
intersectionType.ID(),
)

assert.Equal(t, 1, dictValue.Count())

value, ok := dictValue.Get(inter, locationRange, typeValue)
require.True(t, ok)

Expand Down Expand Up @@ -948,6 +952,8 @@ func TestRehashNestedIntersectionType(t *testing.T) {
intersectionType.ID(),
)

assert.Equal(t, 1, dictValue.Count())

value, ok := dictValue.Get(inter, locationRange, typeValue)
require.True(t, ok)

Expand Down
2 changes: 2 additions & 0 deletions migrations/statictypes/statictype_migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,8 @@ func TestOptionalTypeRehash(t *testing.T) {
optionalType.ID(),
)

assert.Equal(t, 1, dictValue.Count())

value, ok := dictValue.Get(inter, locationRange, typeValue)
require.True(t, ok)

Expand Down
4 changes: 4 additions & 0 deletions migrations/string_normalization/migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,8 @@ func TestStringValueRehash(t *testing.T) {
stringValue.HashInput(inter, locationRange, nil),
)

assert.Equal(t, 1, dictValue.Count())

value, ok := dictValue.Get(inter, locationRange, stringValue)
require.True(t, ok)

Expand Down Expand Up @@ -633,6 +635,8 @@ func TestCharacterValueRehash(t *testing.T) {
characterValue.HashInput(inter, locationRange, nil),
)

assert.Equal(t, 1, dictValue.Count())

value, ok := dictValue.Get(inter, locationRange, characterValue)
require.True(t, ok)

Expand Down

0 comments on commit 5504380

Please sign in to comment.