MCPcopy Create free account
hub / github.com/Shopify/goluago / testRandomMap

Function testRandomMap

util/deep_pull_test.go:24–36  ·  view source on GitHub ↗
(t *testing.T, size int)

Source from the content-addressed store, hash-verified

22func TestPullString_Random1000(t *testing.T) { testRandomMap(t, 1000) }
23
24func testRandomMap(t *testing.T, size int) {
25 l := lua.NewState()
26 want := randomMap(size)
27
28 util.DeepPush(l, want)
29 got, err := util.PullStringTable(l, 1)
30
31 if err != nil {
32 t.Fatalf("pulling table, %v", err)
33 }
34
35 checkMaps(t, want, got)
36}
37
38func checkMaps(t *testing.T, want, got map[string]string) {
39 for wantKey, wantVal := range want {

Callers 4

TestPullString_Random0Function · 0.85
TestPullString_Random10Function · 0.85
TestPullString_Random100Function · 0.85

Calls 4

DeepPushFunction · 0.92
PullStringTableFunction · 0.92
randomMapFunction · 0.85
checkMapsFunction · 0.85

Tested by

no test coverage detected