init: v1.0.0
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestLowerBound(t *testing.T) {
|
||||
fmt.Println(lowerBound(1024))
|
||||
}
|
||||
func TestP(t *testing.T) {
|
||||
tests := []string{
|
||||
"Frequency",
|
||||
"BlockFrequency",
|
||||
"CumulativeSums",
|
||||
"Runs",
|
||||
"LongestRunOfOnes",
|
||||
"Rank",
|
||||
"DiscreteFourierTransform",
|
||||
"Universal",
|
||||
"ApproximateEntropy",
|
||||
"LinearComplexity",
|
||||
"Serial",
|
||||
"Poker",
|
||||
"Autocorrelation",
|
||||
"BinaryDerivative",
|
||||
"RunsDistribution",
|
||||
}
|
||||
for _, t := range tests {
|
||||
fmt.Printf(`
|
||||
sum = 0
|
||||
for _, e := range epsilons {
|
||||
if statistics.%s(e) {
|
||||
sum += 1
|
||||
}
|
||||
}
|
||||
if sum < bound {
|
||||
fmt.Printf("%s Test Failed: \d/\d\n", sum, len(epsilons))
|
||||
}
|
||||
`, t, t)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user