1 // Copyright 2023 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.
14 func TestAll(t *testing.T) {
15 data, err := os.ReadFile("../../../doc/godebug.md")
22 for _, info := range godebugs.All {
23 if info.Name <= last {
24 t.Errorf("All not sorted: %s then %s", last, info.Name)
28 if info.Package == "" {
29 t.Errorf("Name=%s missing Package", info.Name)
31 if info.Changed != 0 && info.Old == "" {
32 t.Errorf("Name=%s has Changed, missing Old", info.Name)
34 if info.Old != "" && info.Changed == 0 {
35 t.Errorf("Name=%s has Old, missing Changed", info.Name)
37 if !strings.Contains(doc, "`"+info.Name+"`") {
38 t.Errorf("Name=%s not documented in doc/godebug.md", info.Name)