diff --git a/ql/test/library-tests/controlflow/graph/Cfg.expected b/ql/test/library-tests/controlflow/graph/Cfg.expected index 204f8781111..9aecfae2e99 100644 --- a/ql/test/library-tests/controlflow/graph/Cfg.expected +++ b/ql/test/library-tests/controlflow/graph/Cfg.expected @@ -73,6 +73,9 @@ heredoc.rb: #-----| -> < 1 + # 1| enter m1 #-----| -> x @@ -88,6 +91,9 @@ ifs.rb: # 32| enter m5 #-----| -> b1 +# 36| enter conditional_method_def +#-----| -> String + loops.rb: # 1| enter m1 #-----| -> x @@ -2265,6 +2271,31 @@ ifs.rb: # 33| String #-----| -> If +# 36| UnlessModifier +#-----| -> exit top-level (normal) + +# 36| conditional_method_def +#-----| -> UnlessModifier + +# 37| MethodCall +#-----| -> exit conditional_method_def (normal) + +# 37| puts +#-----| -> MethodCall + +# 37| String +#-----| -> puts + +# 38| Binary +#-----| true -> UnlessModifier +#-----| false -> conditional_method_def + +# 38| 1 +#-----| -> 2 + +# 38| 2 +#-----| -> Binary + loops.rb: # 1| x #-----| -> While @@ -3404,6 +3435,8 @@ heredoc.rb: # 1| exit double_heredoc ifs.rb: +# 1| exit top-level + # 1| exit m1 # 11| exit m2 @@ -3414,6 +3447,8 @@ ifs.rb: # 32| exit m5 +# 36| exit conditional_method_def + loops.rb: # 1| exit m1 @@ -3533,6 +3568,9 @@ heredoc.rb: #-----| -> exit double_heredoc ifs.rb: +# 1| exit top-level (normal) +#-----| -> exit top-level + # 1| exit m1 (normal) #-----| -> exit m1 @@ -3548,6 +3586,9 @@ ifs.rb: # 32| exit m5 (normal) #-----| -> exit m5 +# 36| exit conditional_method_def (normal) +#-----| -> exit conditional_method_def + loops.rb: # 1| exit m1 (normal) #-----| -> exit m1 diff --git a/ql/test/library-tests/controlflow/graph/ifs.rb b/ql/test/library-tests/controlflow/graph/ifs.rb index bbb8f93de7b..a774f1e8ca6 100644 --- a/ql/test/library-tests/controlflow/graph/ifs.rb +++ b/ql/test/library-tests/controlflow/graph/ifs.rb @@ -31,4 +31,8 @@ end def m5 (b1, b2, b3, b4, b5) if (if b1 then b2 elsif b3 then b4 else b5 end) then "b2 || b4 || b5" else "!b2 || !b4 || !b5" end -end \ No newline at end of file +end + +def conditional_method_def() + puts "bla" +end unless 1 == 2