Categorygithub.com/cockroachdb/datadriven
modulepackage
1.0.2
Repository: https://github.com/cockroachdb/datadriven.git
Documentation: pkg.go.dev

# README

Data-Driven Tests for Go

This repository implements an extension of Table-Driven Testing. Instead of building and iterating over a table in the test code, the input is further separated into files (or inline strings). For certain classes of tests, this can significantly reduce the friction involved in writing and reading these tests.

# Packages

No description provided by the author

# Functions

No description provided by the author
ParseLine parses a datadriven directive line and returns the parsed command and CmdArgs.
RunTest invokes a data-driven test.
RunTestFromString is a version of RunTest which takes the contents of a test directly.
Verbose returns true iff -datadriven-quiet was not passed.
Walk goes through all the files in a subdirectory, creating subtests to match the file hierarchy; for each "leaf" file, the given function is called.

# Structs

CmdArg contains information about an argument on the directive line.
TestData contains information about one data-driven test case that was parsed from the test file.