Skip to content

Commit 0efbd4d

Browse files
committed
add IsClosed to UnitTest
1 parent a649d3d commit 0efbd4d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module github.com/yuin/gopher-lua
22

3+
go 1.14
4+
35
require (
46
github.com/chzyer/logex v1.1.10 // indirect
57
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e

state_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ import (
77
"time"
88
)
99

10+
func TestLStateIsClosed(t *testing.T) {
11+
L := NewState()
12+
L.Close()
13+
errorIfNotEqual(t, true, L.IsClosed())
14+
}
15+
1016
func TestCallStackOverflowWhenFixed(t *testing.T) {
1117
L := NewState(Options{
1218
CallStackSize: 3,

0 commit comments

Comments
 (0)