aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Levasseur <rlevasseur@google.com>2023-06-25 10:31:21 -0700
committerRichard Levasseur <rlevasseur@google.com>2023-07-03 00:00:35 -0700
commit27beb205f852a5712390f162663153efcded3149 (patch)
tree40297405d58008889bc94bf1f2a9b596ff3cb55e
parent3d54459f95e7593cc2e62ecdc1165237abe01cf9 (diff)
downloadbazelbuild-rules_testing-27beb205f852a5712390f162663153efcded3149.tar.gz
feat: publically expose the rest of the subjects
This allows using them directly with arbitrary values without having to go through the expect object. This is helpful for when the value is manually constructed and the metadata needs more direct customization. Fixes #54
-rw-r--r--lib/truth.bzl8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/truth.bzl b/lib/truth.bzl
index 52b8ba3..51e8093 100644
--- a/lib/truth.bzl
+++ b/lib/truth.bzl
@@ -45,10 +45,14 @@ def foo_test(env, target):
load("//lib/private:bool_subject.bzl", "BoolSubject")
load("//lib/private:collection_subject.bzl", "CollectionSubject")
load("//lib/private:depset_file_subject.bzl", "DepsetFileSubject")
+load("//lib/private:dict_subject.bzl", "DictSubject")
load("//lib/private:expect.bzl", "Expect")
+load("//lib/private:file_subject.bzl", "FileSubject")
load("//lib/private:int_subject.bzl", "IntSubject")
load("//lib/private:label_subject.bzl", "LabelSubject")
+load("//lib/private:runfiles_subject.bzl", "RunfilesSubject")
load("//lib/private:str_subject.bzl", "StrSubject")
+load("//lib/private:target_subject.bzl", "TargetSubject")
load("//lib/private:matching.bzl", _matching = "matching")
# Rather than load many symbols, just load this symbol, and then all the
@@ -65,8 +69,12 @@ subjects = struct(
bool = BoolSubject.new,
collection = CollectionSubject.new,
depset_file = DepsetFileSubject.new,
+ dict = DictSubject.new,
+ file = FileSubject.new,
int = IntSubject.new,
label = LabelSubject.new,
+ runfiles = RunfilesSubject.new,
str = StrSubject.new,
+ target = TargetSubject.new,
# keep sorted end
)