๐Ÿ“ฆ jtr109 / go-playground

๐Ÿ“„ lib_test.go ยท 36 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36package minimumwindowsubstring

import (
	"testing"

	"github.com/stretchr/testify/assert"
)

func TestExample1(t_ *testing.T) {
	s := "ADOBECODEBANC"
	t := "ABC"
	expected := "BANC"
	assert.Equal(t_, expected, minWindow(s, t))
}

func TestExample2(t_ *testing.T) {
	s := "a"
	t := "a"
	expected := "a"
	assert.Equal(t_, expected, minWindow(s, t))
}

func TestExample3(t_ *testing.T) {
	s := "a"
	t := "aa"
	expected := ""
	assert.Equal(t_, expected, minWindow(s, t))
}

func TestSubmission1(t_ *testing.T) {
	s := "a"
	t := "b"
	expected := ""
	assert.Equal(t_, expected, minWindow(s, t))
}