您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

28 行
666 B

  1. // Copyright 2016 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package route
  5. import "testing"
  6. func TestFetchAndParseRIBOnDarwin(t *testing.T) {
  7. for _, af := range []int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
  8. for _, typ := range []RIBType{sysNET_RT_FLAGS, sysNET_RT_DUMP2, sysNET_RT_IFLIST2} {
  9. ms, err := fetchAndParseRIB(af, typ)
  10. if err != nil {
  11. t.Error(err)
  12. continue
  13. }
  14. ss, err := msgs(ms).validate()
  15. if err != nil {
  16. t.Errorf("%v %d %v", addrFamily(af), typ, err)
  17. continue
  18. }
  19. for _, s := range ss {
  20. t.Log(s)
  21. }
  22. }
  23. }
  24. }