Skip to content

Commit

Permalink
test: improve SetMaxVariables test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeneux committed Jul 23, 2024
1 parent 0358f8f commit 5392a0f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion engine/vm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,19 @@ func TestVM_SetUserOutput(t *testing.T) {
}

func TestVM_SetMaxVariables(t *testing.T) {
t.Run("ok", func(t *testing.T) {
t.Run("limits", func(t *testing.T) {
var vm VM
vm.SetMaxVariables(10)
assert.Equal(t, uint64(10), maxVariables)
assert.Equal(t, uint64(10), vm.maxVariables)
})

t.Run("no limit", func(t *testing.T) {
var vm VM
vm.SetMaxVariables(0)
assert.Equal(t, uint64(0), maxVariables)
assert.Equal(t, uint64(0), vm.maxVariables)
})
}

func TestProcedureIndicator_Apply(t *testing.T) {
Expand Down

0 comments on commit 5392a0f

Please sign in to comment.