Cleanup and reorganization
This commit is contained in:
1 parent
0af5c11e6d
commit
2107b9c990
20 files changed
+158
-215
No files matched your search
@@ -0,0 +1,18 @@
|
||||
package helpers
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
type Function func(input string) int
|
||||
|
||||
func Check(t *testing.T, f Function, input string, expected int) {
|
||||
if actual := f(input); actual != expected {
|
||||
t.Fatalf("Expected %v, got %v", expected, actual)
|
||||
}
|
||||
}
|
||||
|
||||
func Format(input string) string {
|
||||
return strings.ReplaceAll(input, "\r", "")
|
||||
}
|
||||
Reference in new issue
Block a user