|
|
|
package main
|
|
|
|
|
Refactor & Beautify & destruction commit
return early, remove else branches, reorder conditions and top-level functions, remove empty lines, remove unnecessary append(), fix typos, stop using testing package, remove dead code, fix mistakes in subjects, tests and solutions, remove disclaimers, reformat comments, simplify solutions, tests, add more instructions to subjects, remove obsolete files, etc.
Some of the reasons behind those modifications will be added to good-practices.en.md
Some of the exercises are now broken, they will have to be fixed, most of them have a "TODO:" comment.
5 years ago
|
|
|
import "github.com/01-edu/z01"
|
|
|
|
|
|
|
|
func main() {
|
Refactor & Beautify & destruction commit
return early, remove else branches, reorder conditions and top-level functions, remove empty lines, remove unnecessary append(), fix typos, stop using testing package, remove dead code, fix mistakes in subjects, tests and solutions, remove disclaimers, reformat comments, simplify solutions, tests, add more instructions to subjects, remove obsolete files, etc.
Some of the reasons behind those modifications will be added to good-practices.en.md
Some of the exercises are now broken, they will have to be fixed, most of them have a "TODO:" comment.
5 years ago
|
|
|
oneArgs := []string{
|
|
|
|
"(johndoe)",
|
|
|
|
")()",
|
|
|
|
"([)]",
|
|
|
|
"{2*[d - 3]/(12)}",
|
|
|
|
}
|
|
|
|
|
|
|
|
// 18 random tests ( at least half are valid)
|
|
|
|
for i := 0; i < 3; i++ {
|
Refactor & Beautify & destruction commit
return early, remove else branches, reorder conditions and top-level functions, remove empty lines, remove unnecessary append(), fix typos, stop using testing package, remove dead code, fix mistakes in subjects, tests and solutions, remove disclaimers, reformat comments, simplify solutions, tests, add more instructions to subjects, remove obsolete files, etc.
Some of the reasons behind those modifications will be added to good-practices.en.md
Some of the exercises are now broken, they will have to be fixed, most of them have a "TODO:" comment.
5 years ago
|
|
|
oneArgs = append(oneArgs,
|
|
|
|
"("+z01.RandASCII()+")",
|
|
|
|
"["+z01.RandASCII()+"]",
|
|
|
|
"{"+z01.RandASCII()+"}",
|
|
|
|
"("+z01.RandAlnum()+")",
|
|
|
|
"["+z01.RandAlnum()+"]",
|
|
|
|
"{"+z01.RandAlnum()+"}",
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
z01.ChallengeMain("brackets")
|
|
|
|
|
|
|
|
for _, v := range oneArgs {
|
|
|
|
z01.ChallengeMain("brackets", v)
|
|
|
|
}
|
|
|
|
|
Refactor & Beautify & destruction commit
return early, remove else branches, reorder conditions and top-level functions, remove empty lines, remove unnecessary append(), fix typos, stop using testing package, remove dead code, fix mistakes in subjects, tests and solutions, remove disclaimers, reformat comments, simplify solutions, tests, add more instructions to subjects, remove obsolete files, etc.
Some of the reasons behind those modifications will be added to good-practices.en.md
Some of the exercises are now broken, they will have to be fixed, most of them have a "TODO:" comment.
5 years ago
|
|
|
multArg := [][]string{
|
|
|
|
{"", "{[(0 + 0)(1 + 1)](3*(-1)){()}}"},
|
|
|
|
{"{][]}", "{3*[21/(12+ 23)]}"},
|
|
|
|
{"{([)])}", "{{{something }- [something]}}", "there are"},
|
|
|
|
}
|
|
|
|
|
|
|
|
for _, v := range multArg {
|
|
|
|
z01.ChallengeMain("brackets", v...)
|
|
|
|
}
|
|
|
|
}
|