2019-11-15 10:32:40 +00:00
|
|
|
package consensus
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestChangeView_Setters(t *testing.T) {
|
|
|
|
var c changeView
|
|
|
|
|
2020-08-09 20:31:34 +00:00
|
|
|
c.SetTimestamp(123 * nanoInSec)
|
|
|
|
require.EqualValues(t, 123*nanoInSec, c.Timestamp())
|
2019-11-15 10:32:40 +00:00
|
|
|
|
|
|
|
c.SetNewViewNumber(2)
|
|
|
|
require.EqualValues(t, 2, c.NewViewNumber())
|
|
|
|
}
|