Don't check ordering for defines
This will improve the robustness of the tests, as define ordering is
not meaningful.
PiperOrigin-RevId: 292345582
diff --git a/BUILD b/BUILD
index 4ecf9e9..9963588 100644
--- a/BUILD
+++ b/BUILD
@@ -28,8 +28,8 @@
build_version = "%s.{date}.{buildnum}" % TULSI_VERSION_MAJOR,
capture_groups = {
"project": "[^_]*",
- "date": "\d+",
- "buildnum": "\d+",
+ "date": "\\d+",
+ "buildnum": "\\d+",
},
fallback_build_label = "tulsi_%s_build88" % TULSI_VERSION_DATE,
)
diff --git a/src/TulsiGeneratorIntegrationTests/AspectTests.swift b/src/TulsiGeneratorIntegrationTests/AspectTests.swift
index 27d36fb..7bca999 100644
--- a/src/TulsiGeneratorIntegrationTests/AspectTests.swift
+++ b/src/TulsiGeneratorIntegrationTests/AspectTests.swift
@@ -709,13 +709,13 @@
/// Asserts that the contextual RuleEntry has an attribute with the given name and value.
@discardableResult
- func hasObjcDefines(_ value: [String], line: UInt = #line) -> Context {
+ func hasObjcDefines(_ value: Set<String>, line: UInt = #line) -> Context {
guard let ruleEntry = ruleEntry else { return self }
guard let defines = ruleEntry.objcDefines else {
XCTFail("\(ruleEntry) expected to have defines", line: line)
return self
}
- XCTAssertEqual(defines, value, line: line)
+ XCTAssertEqual(Set(defines), value, line: line)
return self
}