@@ -40,12 +40,13 @@ def testIsSimpleStatement():
4040 stmts = temp_stmts
4141
4242
43- def testPreControl ():
44- a_proj = scubatrace .CProject ("../c" )
45- test_c = a_proj .files ["test.c" ]
46- func_main = test_c .functions [1 ]
47- # print(func_main.statements[3].pre_controls[2].text)
48- func_main .export_cfg_dot ("test.dot" , with_cdg = True , with_ddg = True )
43+ def testCFG ():
44+ proj = scubatrace .Project .Project ("." , language .C )
45+ test_c = proj .files ["test.c" ]
46+ for func in test_c .functions :
47+ print (f"Function: { func .name } " )
48+ func .export_cfg_dot (f"{ func .name } _cfg.dot" , with_ddg = False , with_cdg = False )
49+ print (f"CFG exported for function { func .name } to { func .name } _cfg.dot" )
4950
5051
5152def testPostControl ():
@@ -370,7 +371,7 @@ def test_identifier_pre_data_dependents():
370371
371372
372373def test_identifier_post_data_dependents ():
373- project = scubatrace .Project .Project ("." , language .C )
374+ project = scubatrace .Project .Project ("." , scubatrace . language .C )
374375 test_c = project .files ["test.c" ]
375376 func_main = test_c .functions [1 ]
376377 for stat in func_main .statements :
@@ -390,4 +391,4 @@ def test_identifier_post_data_dependents():
390391
391392
392393if __name__ == "__main__" :
393- testCalls ()
394+ test_identifier_post_data_dependents ()
0 commit comments