chore: remove tests
This commit is contained in:
parent
a7ff717b7a
commit
8a95ea80a7
2 changed files with 0 additions and 66 deletions
|
|
@ -1,34 +0,0 @@
|
||||||
package q134
|
|
||||||
|
|
||||||
import (
|
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Test_canCompleteCircuit(t *testing.T) {
|
|
||||||
tests := []struct {
|
|
||||||
name string // description of this test case
|
|
||||||
// Named input parameters for target function.
|
|
||||||
gas []int
|
|
||||||
cost []int
|
|
||||||
want int
|
|
||||||
}{
|
|
||||||
{
|
|
||||||
gas: []int{1, 2, 3, 4, 5},
|
|
||||||
cost: []int{3, 4, 5, 1, 2},
|
|
||||||
want: 3,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
gas: []int{2, 3, 4},
|
|
||||||
cost: []int{3, 4, 3},
|
|
||||||
want: -1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
for _, tt := range tests {
|
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
|
||||||
got := canCompleteCircuit(tt.gas, tt.cost)
|
|
||||||
if got != tt.want {
|
|
||||||
t.Errorf("canCompleteCircuit() = %v, want %v", got, tt.want)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
package q238
|
|
||||||
|
|
||||||
import (
|
|
||||||
"slices"
|
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Test_productExceptSelf(t *testing.T) {
|
|
||||||
tests := []struct {
|
|
||||||
name string // description of this test case
|
|
||||||
// Named input parameters for target function.
|
|
||||||
nums []int
|
|
||||||
want []int
|
|
||||||
}{
|
|
||||||
{
|
|
||||||
nums: []int{1, 2, 3, 4},
|
|
||||||
want: []int{24, 12, 8, 6},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
nums: []int{-1, 1, 0, -3, 3},
|
|
||||||
want: []int{0, 0, 9, 0, 0},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
for _, tt := range tests {
|
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
|
||||||
got := productExceptSelf(tt.nums)
|
|
||||||
if !slices.Equal(got, tt.want) {
|
|
||||||
t.Errorf("productExceptSelf() = %v, want %v", got, tt.want)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue