2019-11-15 10:32:40 +00:00
|
|
|
package consensus
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2024-03-21 20:38:24 +00:00
|
|
|
"github.com/nspcc-dev/dbft"
|
2019-11-15 10:32:40 +00:00
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
)
|
|
|
|
|
2024-03-21 20:38:24 +00:00
|
|
|
func TestChangeView_Getters(t *testing.T) {
|
|
|
|
var c = &changeView{
|
|
|
|
newViewNumber: 2,
|
|
|
|
reason: dbft.CVTimeout,
|
|
|
|
}
|
2019-11-15 10:32:40 +00:00
|
|
|
|
|
|
|
require.EqualValues(t, 2, c.NewViewNumber())
|
2024-03-21 20:38:24 +00:00
|
|
|
require.EqualValues(t, dbft.CVTimeout, c.Reason())
|
2019-11-15 10:32:40 +00:00
|
|
|
}
|