Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
dsainati1 committed Oct 24, 2023
1 parent dec3432 commit 76c7586
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions runtime/tests/checker/entitlements_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,21 @@ func TestCheckBasicEntitlementMappingAccess(t *testing.T) {
require.IsType(t, &sema.InvalidEntitlementMappingTypeError{}, errs[0])
})

t.Run("mapping without keyword", func(t *testing.T) {
t.Parallel()

_, err := ParseAndCheck(t, `
entitlement mapping N {}
resource interface R {
access(N) let foo: String
}
`)

errs := RequireCheckerErrors(t, err, 1)

require.IsType(t, &sema.MappingAccessMissingKeywordError{}, errs[0])
})

t.Run("multiple mappings disjunction with regular", func(t *testing.T) {
t.Parallel()

Expand Down

0 comments on commit 76c7586

Please sign in to comment.