| 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 | testenv.NeedsLocalXTools(t) |
| 16 | |
| 17 | ok, err := doMain(false) |
| 18 | if err != nil { |
| 19 | t.Fatal(err) |
| 20 | } |
| 21 | if !ok { |
| 22 | t.Error("documentation needs updating. Run: cd gopls && go generate ./...") |
| 23 | } |
| 24 | } |