Skip to main content

Crate use_go_test

Crate use_go_test 

Source
Expand description

§use-go-test

Go testing metadata primitives for RustUse.

§Experimental

use-go-test is experimental while use-go remains below 0.3.0.

§Example

use use_go_test::{GoTestFileName, GoTestKind, GoTestName};

let test = GoTestName::new("TestHandler")?;
let file = GoTestFileName::new("handler_test.go")?;

assert_eq!(test.as_str(), "TestHandler");
assert_eq!(file.as_str(), "handler_test.go");
assert_eq!(GoTestKind::Test.to_string(), "test");

§Scope

  • Go test, benchmark, fuzz, and example name metadata.
  • _test.go file-name metadata.
  • Test kind, outcome, and package-mode labels.

§Non-goals

  • Running go test.
  • Parsing Go test files.
  • Interpreting Go test output.

§License

Licensed under either Apache-2.0 or MIT.

Structs§

GoBenchmarkName
GoExampleName
GoFuzzTestName
GoTestFileName
Validated Go test file-name metadata.
GoTestName

Enums§

GoTestError
Error returned by Go testing metadata constructors.
GoTestKind
Go test kind metadata.
GoTestOutcome
Go test outcome metadata.
GoTestPackageMode
Go test package mode metadata.