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

Function Test_insert

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

Source from the content-addressed store, hash-verified

6)
7
8func Test_insert(t *testing.T) {
9 type args struct {
10 intervals [][]int
11 newInterval []int
12 }
13 tests := []struct {
14 name string
15 args args
16 want [][]int
17 }{
18 {
19 name: "insert interval",
20 args: args{
21 intervals: [][]int{
22 {2, 4},
23 {7, 9},
24 },
25 newInterval: []int{
26 5, 6,
27 },
28 },
29 want: [][]int{
30 {2, 4},
31 {5, 6},
32 {7, 9},
33 },
34 },
35 {
36 name: "insert interval",
37 args: args{
38 intervals: [][]int{
39 {2, 4},
40 {7, 9},
41 },
42 newInterval: []int{
43 5, 7,
44 },
45 },
46 want: [][]int{
47 {2, 4},
48 {5, 9},
49 },
50 },
51 {
52 name: "insert interval",
53 args: args{
54 intervals: [][]int{
55 {2, 4},
56 {7, 9},
57 },
58 newInterval: []int{
59 5, 9,
60 },
61 },
62 want: [][]int{
63 {2, 4},
64 {5, 9},
65 },

Callers

nothing calls this directly

Calls 1

insertFunction · 0.85

Tested by

no test coverage detected