mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Introduce modules to merge 3, 4, and 5 inline expectation tests
This commit is contained in:
@@ -396,6 +396,63 @@ module Make<InlineExpectationsTestSig Impl> {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A module that merges three test signatures.
|
||||
*/
|
||||
module MergeTests3<TestSig TestImpl1, TestSig TestImpl2, TestSig TestImpl3> implements TestSig {
|
||||
private module M = MergeTests<MergeTests<TestImpl1, TestImpl2>, TestImpl3>;
|
||||
|
||||
string getARelevantTag() { result = M::getARelevantTag() }
|
||||
|
||||
predicate hasActualResult(Impl::Location location, string element, string tag, string value) {
|
||||
M::hasActualResult(location, element, tag, value)
|
||||
}
|
||||
|
||||
predicate hasOptionalResult(Impl::Location location, string element, string tag, string value) {
|
||||
M::hasOptionalResult(location, element, tag, value)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A module that merges four test signatures.
|
||||
*/
|
||||
module MergeTests4<TestSig TestImpl1, TestSig TestImpl2, TestSig TestImpl3, TestSig TestImpl4>
|
||||
implements TestSig
|
||||
{
|
||||
private module M = MergeTests<MergeTests3<TestImpl1, TestImpl2, TestImpl3>, TestImpl4>;
|
||||
|
||||
string getARelevantTag() { result = M::getARelevantTag() }
|
||||
|
||||
predicate hasActualResult(Impl::Location location, string element, string tag, string value) {
|
||||
M::hasActualResult(location, element, tag, value)
|
||||
}
|
||||
|
||||
predicate hasOptionalResult(Impl::Location location, string element, string tag, string value) {
|
||||
M::hasOptionalResult(location, element, tag, value)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A module that merges five test signatures.
|
||||
*/
|
||||
module MergeTests5<
|
||||
TestSig TestImpl1, TestSig TestImpl2, TestSig TestImpl3, TestSig TestImpl4, TestSig TestImpl5>
|
||||
implements TestSig
|
||||
{
|
||||
private module M =
|
||||
MergeTests<MergeTests4<TestImpl1, TestImpl2, TestImpl3, TestImpl4>, TestImpl5>;
|
||||
|
||||
string getARelevantTag() { result = M::getARelevantTag() }
|
||||
|
||||
predicate hasActualResult(Impl::Location location, string element, string tag, string value) {
|
||||
M::hasActualResult(location, element, tag, value)
|
||||
}
|
||||
|
||||
predicate hasOptionalResult(Impl::Location location, string element, string tag, string value) {
|
||||
M::hasOptionalResult(location, element, tag, value)
|
||||
}
|
||||
}
|
||||
|
||||
private module LegacyImpl implements TestSig {
|
||||
string getARelevantTag() { result = any(InlineExpectationsTest t).getARelevantTag() }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user