golang/go

all: test that all examples run on golang.org, i.e. the playground

Open

#19,825 建立於 2017年4月3日

在 GitHub 查看
 (11 留言) (0 反應) (0 負責人)Go (19,008 fork)batch import
NeedsFixTestinghelp wanted

倉庫指標

Star
 (133,883 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Right now, examples are only run via go test by the trybots. That checks whether or not they run as tests, but it doesn't check if they run in the playground.

For instance, see #19823. That example depends on its own test file, example_test.go. That will be available if one runs go test, but not if one presses "Run" in https://golang.org/pkg/go/parser/#example_ParseFile which will run it in the playground.

There should be a mechanism to ensure that all of the examples run on the golang.org docs too. In other words, that they pass when executed in the playground.

貢獻者指南