MCPcopy Create free account
hub / github.com/austingebauer/go-leetcode / Test_exist

Function Test_exist

word_search_79/solution_test.go:8–115  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

6)
7
8func Test_exist(t *testing.T) {
9 type args struct {
10 board [][]byte
11 word string
12 }
13 tests := []struct {
14 name string
15 args args
16 want bool
17 }{
18 {
19 name: "word search",
20 args: args{
21 board: [][]byte{
22 {'A', 'B', 'C', 'E'},
23 {'S', 'F', 'C', 'S'},
24 {'A', 'D', 'E', 'E'},
25 },
26 word: "ABCCED",
27 },
28 want: true,
29 },
30 {
31 name: "word search",
32 args: args{
33 board: [][]byte{
34 {'A', 'B', 'C', 'E'},
35 {'S', 'F', 'C', 'S'},
36 {'A', 'D', 'E', 'E'},
37 },
38 word: "SEE",
39 },
40 want: true,
41 },
42 {
43 name: "word search",
44 args: args{
45 board: [][]byte{
46 {'A', 'B', 'C', 'E'},
47 {'S', 'F', 'C', 'S'},
48 {'A', 'D', 'E', 'E'},
49 },
50 word: "ABCB",
51 },
52 want: false,
53 },
54 {
55 name: "word search",
56 args: args{
57 board: [][]byte{
58 {'A'},
59 },
60 word: "A",
61 },
62 want: true,
63 },
64 {
65 name: "word search",

Callers

nothing calls this directly

Calls 1

existFunction · 0.85

Tested by

no test coverage detected