feat: Add StructSubject

StructSubject is a subject to wrap structs and return their values as
other subjects. This makes it easier to test ad-hoc struct values, such
as ones returned by helper functions, because a dedicated subject
implementation doesn't need to be written. All that needs to be provided
are the attribute names and factory functions to handle them.

Fixes https://github.com/bazelbuild/rules_testing/issues/53
11 files changed
tree: e32d99cafa0715162dab66a7c591c10d2c07b538
  1. .bazelci/
  2. .bcr/
  3. .github/
  4. docgen/
  5. docs/
  6. e2e/
  7. lib/
  8. tests/
  9. .bazelignore
  10. .bazelrc
  11. .gitignore
  12. .readthedocs.yaml
  13. addlicense.sh
  14. AUTHORS
  15. BUILD
  16. CODEOWNERS
  17. CONTRIBUTING.md
  18. dev_extension.bzl
  19. LICENSE
  20. MODULE.bazel
  21. README.md
  22. RELEASING.md
  23. WORKSPACE.bazel
  24. WORKSPACE.bzlmod
README.md

Buildstatus

Framworks and utilities for testing Bazel Starlark

rules_testing provides frameworks and utilities to make testing Starlark code easier and convenient.

For detailed docs, see the docs website