mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
Ruby: CFG: add test case
This commit is contained in:
@@ -1010,7 +1010,7 @@ case.rb:
|
||||
#-----| -> value
|
||||
|
||||
# 69| case_match_various
|
||||
#-----| -> exit case.rb (normal)
|
||||
#-----| -> case_match_guard_no_else
|
||||
|
||||
# 69| exit case_match_various
|
||||
|
||||
@@ -1311,6 +1311,51 @@ case.rb:
|
||||
#-----| raise -> exit case_match_various (abnormal)
|
||||
#-----| match -> exit case_match_various (normal)
|
||||
|
||||
# 95| enter case_match_guard_no_else
|
||||
#-----| -> value
|
||||
|
||||
# 95| case_match_guard_no_else
|
||||
#-----| -> exit case.rb (normal)
|
||||
|
||||
# 95| exit case_match_guard_no_else
|
||||
|
||||
# 95| exit case_match_guard_no_else (abnormal)
|
||||
#-----| -> exit case_match_guard_no_else
|
||||
|
||||
# 95| exit case_match_guard_no_else (normal)
|
||||
#-----| -> exit case_match_guard_no_else
|
||||
|
||||
# 95| value
|
||||
#-----| -> case ...
|
||||
|
||||
# 96| case ...
|
||||
#-----| -> value
|
||||
|
||||
# 96| value
|
||||
#-----| -> in ... then ...
|
||||
|
||||
# 97| in ... then ...
|
||||
#-----| -> x
|
||||
|
||||
# 97| x
|
||||
#-----| match -> x
|
||||
|
||||
# 97| ... == ...
|
||||
#-----| true -> 6
|
||||
#-----| raise -> exit case_match_guard_no_else (abnormal)
|
||||
|
||||
# 97| x
|
||||
#-----| -> 5
|
||||
|
||||
# 97| 5
|
||||
#-----| -> ... == ...
|
||||
|
||||
# 97| then ...
|
||||
#-----| -> exit case_match_guard_no_else (normal)
|
||||
|
||||
# 97| 6
|
||||
#-----| -> then ...
|
||||
|
||||
cfg.html.erb:
|
||||
# 5| enter cfg.html.erb
|
||||
#-----| -> @title
|
||||
|
||||
@@ -90,6 +90,7 @@ positionalArguments
|
||||
| case.rb:77:8:77:18 | call to [] | case.rb:77:11:77:13 | :"foo" |
|
||||
| case.rb:77:8:77:18 | call to [] | case.rb:77:15:77:17 | :"bar" |
|
||||
| case.rb:85:15:85:21 | ... == ... | case.rb:85:20:85:21 | 10 |
|
||||
| case.rb:97:13:97:18 | ... == ... | case.rb:97:18:97:18 | 5 |
|
||||
| cfg.html.erb:6:9:6:58 | call to stylesheet_link_tag | cfg.html.erb:6:29:6:41 | "application" |
|
||||
| cfg.html.erb:6:9:6:58 | call to stylesheet_link_tag | cfg.html.erb:6:44:6:58 | Pair |
|
||||
| cfg.html.erb:12:11:12:33 | call to link_to | cfg.html.erb:12:19:12:21 | "A" |
|
||||
|
||||
@@ -91,3 +91,9 @@ def case_match_various value
|
||||
in (0 | "" | [] | {})
|
||||
end
|
||||
end
|
||||
|
||||
def case_match_guard_no_else value
|
||||
case value
|
||||
in x if x == 5 then 6
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user