mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-27 05:38:55 +00:00
954af67882
* deprecate hashutil * Revert "deprecate hashutil" This reverts commit 6ee40f916c6fcf73fe372b980ba5645fe0456f9d. * changing to golang crypto lib * Add comment * add test
37 lines
747 B
Go
37 lines
747 B
Go
package backend
|
|
|
|
import "testing"
|
|
|
|
func TestRunChainTest(t *testing.T) {
|
|
sb, err := NewSimulatedBackend()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
testCase := &ChainTestCase{
|
|
Config: &ChainTestConfig{
|
|
ShardCount: 3,
|
|
CycleLength: 10,
|
|
MinCommitteeSize: 3,
|
|
ValidatorCount: 100,
|
|
},
|
|
}
|
|
if err := sb.RunChainTest(testCase); err != nil {
|
|
t.Errorf("Could not run chaintest: %v", err)
|
|
}
|
|
}
|
|
|
|
func TestRunShuffleTest(t *testing.T) {
|
|
sb, err := NewSimulatedBackend()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
testCase := &ShuffleTestCase{
|
|
Input: []uint32{1, 2, 3, 4, 5},
|
|
Output: []uint32{3, 2, 5, 1, 4},
|
|
Seed: "abcde",
|
|
}
|
|
if err := sb.RunShuffleTest(testCase); err != nil {
|
|
t.Errorf("Could not run chaintest: %v", err)
|
|
}
|
|
}
|