github.com/prysmaticlabs/prysm@v1.4.4/shared/featureconfig/deprecated_flags_test.go (about) 1 package featureconfig 2 3 import ( 4 "reflect" 5 "strings" 6 "testing" 7 8 "github.com/prysmaticlabs/prysm/shared/testutil/assert" 9 ) 10 11 func TestDeprecatedFlags(t *testing.T) { 12 for _, f := range deprecatedFlags { 13 fv := reflect.ValueOf(f) 14 field := reflect.Indirect(fv).FieldByName("Hidden") 15 assert.Equal(t, false, !field.IsValid() || !field.Bool()) 16 assert.Equal(t, false, !strings.Contains(reflect.Indirect(fv).FieldByName("Usage").String(), "DEPRECATED. DO NOT USE.")) 17 } 18 }