Documentation ¶
Overview ¶
Package gtest contains helpers for running google-test tests from Go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TestFlags is the flags that are set for all tests. TestFlags = []string{} )
Functions ¶
func BuildTestArgs ¶
BuildTestArgs builds arguments to be passed to the test binary to execute only the test cases in `indices`.
Types ¶
type TestCase ¶
type TestCase struct { // Suite is the suite for this test. Suite string // Name is the name of this individual test. Name string // contains filtered or unexported fields }
TestCase is a single gtest test case.
func ParseBenchmarks ¶
ParseBenchmarks returns each benchmark in the binary's list as a single test case.
func ParseTestCases ¶
ParseTestCases calls a gtest test binary to list its test and returns a slice with the name and suite of each test.
If benchmarks is true, then benchmarks will be included in the list of test cases provided. Note that this requires the binary to support the benchmarks_list_tests flag.
Click to show internal directories.
Click to hide internal directories.