Skip to content

Commit

Permalink
更新helper助手和README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aQua authored and aQua committed Jul 28, 2017
1 parent 86ecb4f commit 95b8e89
Show file tree
Hide file tree
Showing 569 changed files with 1,704 additions and 1,136 deletions.
5 changes: 3 additions & 2 deletions Algorithms/0016.3sum-closest/3sum-closest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ func Test_Problem0016(t *testing.T) {
para{""},
ans{""},
},

// 如需多个测试,可以复制上方元素。
}

for _, q := range qs {
a, p := q.ans, q.para
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%v", p)
ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0017(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0018.4sum/4sum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0018(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0019(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0020.valid-parentheses/valid-parentheses_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0020(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0021(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0022(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0023(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0024(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0025(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0026(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0027.remove-element/remove-element_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0027(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0028.implement-strstr/implement-strstr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0028(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0029(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0030(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0031.next-permutation/next-permutation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0031(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0032(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0033(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0034.search-for-a-range/search-for-a-range_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0034(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0035(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0036.valid-sudoku/valid-sudoku_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0036(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0037.sudoku-solver/sudoku-solver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0037(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0038.count-and-say/count-and-say_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0038(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0039.combination-sum/combination-sum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0039(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0040.combination-sum-ii/combination-sum-ii_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0040(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0041(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0042(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0043.multiply-strings/multiply-strings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0043(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0044.wildcard-matching/wildcard-matching_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0044(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0045.jump-game-ii/jump-game-ii_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0045(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0046.permutations/permutations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0046(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0047.permutations-ii/permutations-ii_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0047(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0048.rotate-image/rotate-image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0048(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0049.group-anagrams/group-anagrams_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0049(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
5 changes: 3 additions & 2 deletions Algorithms/0050.powx-n/powx-n_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func Test_Problem0050(t *testing.T) {

for _, q := range qs {
a, p := q.ans, q.para

ast.Equal(a.one, p.one, "输入:%v", p)
fmt.Printf("~~%v~~\n", p)

ast.Equal(a.one, (p.one), "输入:%!v(MISSING)", p)
}
}
Loading

0 comments on commit 95b8e89

Please sign in to comment.