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
5package main
6
7import (
8	"testing"
9
10	"golang.org/x/tools/internal/testenv"
11)
12
13func TestGenerated(t *testing.T) {
14	testenv.NeedsGoBuild(t) // This is a lie. We actually need the source code.
15
16	ok, err := doMain("../..", false)
17	if err != nil {
18		t.Fatal(err)
19	}
20	if !ok {
21		t.Error("documentation needs updating. run: `go run doc/generate.go` from the gopls module.")
22	}
23}
24