Skip to content

Commit

Permalink
CFG: Workaround in test output for source/sink pairs with multiple edges
Browse files Browse the repository at this point in the history
  • Loading branch information
hvitved committed Nov 21, 2022
1 parent a69524f commit 8c9431d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -907,9 +907,13 @@ module TestOutput {

query predicate edges(RelevantNode pred, RelevantNode succ, string attr, string val) {
attr = "semmle.label" and
exists(SuccessorType t | succ = getASuccessor(pred, t) |
if successorTypeIsSimple(t) then val = "" else val = t.toString()
)
val =
strictconcat(SuccessorType t, string s |
succ = getASuccessor(pred, t) and
if successorTypeIsSimple(t) then s = "" else s = t.toString()
|
s, ", " order by s
)
or
attr = "semmle.order" and
val =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2775,7 +2775,7 @@ Assert.cs:
#-----| true -> access to parameter b2

# 140| [assertion failure] access to parameter b2
#-----| false -> [assertion failure] access to parameter b3
#-----| false, true -> [assertion failure] access to parameter b3

# 140| access to parameter b2
#-----| false -> [assertion success] access to parameter b3
Expand Down Expand Up @@ -4924,7 +4924,7 @@ ExitMethods.cs:
#-----| -> ...;

# 22| call to method ErrorAlways
#-----| exception(Exception) -> exit M3 (abnormal)
#-----| exception(ArgumentException), exception(Exception) -> exit M3 (abnormal)

# 22| ...;
#-----| -> true
Expand Down

0 comments on commit 8c9431d

Please sign in to comment.