mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-31 23:41:22 +00:00
20 lines
391 B
Go
20 lines
391 B
Go
package utils
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestRealClockIsAccurate(t *testing.T) {
|
|
var clock Clock = &RealClock{}
|
|
clockTime := clock.Now().Second()
|
|
actualTime := time.Now().Second()
|
|
|
|
if clockTime != actualTime {
|
|
t.Errorf("The time from the Clock interface should equal the actual time. Got: %v, Expected: %v", clockTime, actualTime)
|
|
}
|
|
|
|
BlockingWait(0)
|
|
CurrentBeaconSlot()
|
|
}
|