1
0
Fork 0
mirror of https://gitlab.com/mfocko/LeetCode.git synced 2024-11-14 01:49:41 +01:00
LeetCode/go/patching-array_test.go

23 lines
449 B
Go
Raw Normal View History

package main
import (
"testing"
"github.com/stretchr/testify/assert"
)
func Test_PatchingArray_Example1(t *testing.T) {
assert := assert.New(t)
assert.Equal(1, minPatches([]int{1, 3}, 6))
}
func Test_PatchingArray_Example2(t *testing.T) {
assert := assert.New(t)
assert.Equal(2, minPatches([]int{1, 5, 10}, 20))
}
func Test_PatchingArray_Example3(t *testing.T) {
assert := assert.New(t)
assert.Equal(0, minPatches([]int{1, 2, 2}, 5))
}