| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| type systemClockMockImpl struct { |
| func (sc *systemClockMockImpl) Now() time.Time { |
| func (sc *systemClockMockImpl) setNow(now time.Time) { |
| _ SystemClock = (*systemClockImpl)(nil) |
| func TestVClock(t *testing.T) { |
| sysClock := &systemClockMockImpl{} |
| clock.SetSystemClock(sysClock) |
| t.Errorf("timestamp expected to be %q but found to be %q", writeTs, ts) |