From 7961ba6b931b8eeb8a2375e943f4516f5d5b9130 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Mon, 18 Oct 2021 13:43:05 +0100 Subject: [PATCH] Add hasActualResult predicate not using Location --- ql/test/TestUtilities/InlineExpectationsTest.qll | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ql/test/TestUtilities/InlineExpectationsTest.qll b/ql/test/TestUtilities/InlineExpectationsTest.qll index 21d9889ba6d..3d2dc05a5ef 100644 --- a/ql/test/TestUtilities/InlineExpectationsTest.qll +++ b/ql/test/TestUtilities/InlineExpectationsTest.qll @@ -121,7 +121,12 @@ abstract class InlineExpectationsTest extends string { * - `value` - The value of the result, which will be matched against the value associated with * `tag` in any expected result comment on that line. */ - abstract predicate hasActualResult(Location location, string element, string tag, string value); + abstract predicate hasActualResult(string file, int line, string element, string tag, string value); + + predicate hasActualResult(Location location, string element, string tag, string value) { + this.hasActualResult(location.getFile().getAbsolutePath(), location.getStartLine(), element, + tag, value) + } final predicate hasFailureMessage(FailureLocatable element, string message) { exists(ActualResult actualResult |