package
0.0.0-20200918101736-ce9c13308617
Repository: https://github.com/yarcat/progmeister.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# README
Supported Test Runners
All test runners correspond to the function names proposed on the arrays excercises page, however to make them public we have to name them using CamelCase (aka CapWords) notation.
arrays.MaxMin
arrays.IsPermutation
Idea & Example
The framework should help executing tests created by our students. They should work with arrays of any length. Ideal invocation example:
package main
import (
"fmt"
"log"
"github.com/yarcat/progmeister/s01/arrays"
)
func isPermutation(arr [10]int) uint {
// Custom implementation goes here.
return 0
}
func main() {
passed, failed, err := arrays.RunTests(arrays.IsPermutation, isPermutation)
if err != nil {
log.Fatalf("RunTests failed: %v", err)
}
fmt.Printf("Passed=%v, failed=%v\n", passed, failed)
}
Some useful reflect experiments
Creating an array, setting its item and passing to a function: https://play.golang.org/p/n3TovYYUllE