MCPcopy Index your code
hub / github.com/Shopify/go-lua / TestConcurrentNext

Function TestConcurrentNext

vm_test.go:378–399  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

376}
377
378func TestConcurrentNext(t *testing.T) {
379 testString(t, `
380 t = {}
381 t[1], t[2], t[3] = true, true, true
382
383 outer = {}
384 for k1 in pairs(t) do
385 table.insert(outer, k1)
386 inner = {}
387 for k2 in pairs(t) do
388 table.insert(inner, k2)
389 end
390 table.sort(inner)
391 got = table.concat(inner, '')
392 assert(got == '123', 'got ' .. got .. '; want 123')
393 end
394
395 table.sort(outer)
396 got = table.concat(outer, '')
397 assert(got == '123', 'got ' .. got .. '; want 123')
398 `)
399}
400
401func TestLocIsCorrectOnRegisteredFuncCall(t *testing.T) {
402 l := NewState()

Callers

nothing calls this directly

Calls 1

testStringFunction · 0.85

Tested by

no test coverage detected