mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-26 05:17:22 +00:00
17 lines
306 B
Go
17 lines
306 B
Go
|
package p2p
|
||
|
|
||
|
import (
|
||
|
"reflect"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestMappingHasNoDuplicates(t *testing.T) {
|
||
|
m := make(map[reflect.Type]bool)
|
||
|
for _, v := range GossipTopicMappings {
|
||
|
if _, ok := m[reflect.TypeOf(v)]; ok {
|
||
|
t.Errorf("%T is duplicated in the topic mapping", v)
|
||
|
}
|
||
|
m[reflect.TypeOf(v)] = true
|
||
|
}
|
||
|
}
|