golang.org/x/tools/gopls@v0.15.3/doc/generate_test.go (about) 1 // Copyright 2020 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 5 package main 6 7 import ( 8 "testing" 9 10 "golang.org/x/tools/internal/testenv" 11 ) 12 13 func TestGenerated(t *testing.T) { 14 testenv.NeedsGoPackages(t) 15 // This test fails on Kokoro, for unknown reasons, so must be run only on TryBots. 16 // In any case, it suffices to run this test on any builder. 17 testenv.NeedsGo1Point(t, 21) 18 19 testenv.NeedsLocalXTools(t) 20 21 ok, err := doMain(false) 22 if err != nil { 23 t.Fatal(err) 24 } 25 if !ok { 26 t.Error("documentation needs updating. Run: cd gopls && go generate") 27 } 28 }