diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2019-02-13 15:37:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-13 15:37:25 +0100 |
| commit | a4d9c5c598bb03215dc77ac7433934ed2e21b7fe (patch) | |
| tree | cf638332d6bee1b8301a81f096bbdf582935a4c2 /test/expr_type | |
| parent | 29ffd402cd4c20b1e5164b94f8ba74d1f35f4a81 (diff) | |
| parent | 1578f2e84c3137279658c08cbd88a0d7764eb952 (diff) | |
| download | focaccia-miasm-a4d9c5c598bb03215dc77ac7433934ed2e21b7fe.tar.gz focaccia-miasm-a4d9c5c598bb03215dc77ac7433934ed2e21b7fe.zip | |
Merge pull request #975 from commial/feature/objc-c-type-cache
ObjC C type cache
Diffstat (limited to 'test/expr_type')
| -rw-r--r-- | test/expr_type/test_chandler.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/expr_type/test_chandler.py b/test/expr_type/test_chandler.py index 9729eb50..09c588cb 100644 --- a/test/expr_type/test_chandler.py +++ b/test/expr_type/test_chandler.py @@ -507,7 +507,7 @@ tests = [ ] -mychandler = CHandler(types_mngr, expr_types) +mychandler = CHandler(types_mngr, expr_types=expr_types, C_types=c_context) exprc2expr = ExprCToExpr(expr_types, types_mngr) mychandler.updt_expr_types(expr_types) @@ -530,8 +530,8 @@ for (expr, result) in tests: for out_type, out_str in computed: - parsed_expr = mychandler.c_to_expr(out_str, c_context) - parsed_type = mychandler.c_to_type(out_str, c_context) + parsed_expr = mychandler.c_to_expr(out_str) + parsed_type = mychandler.c_to_type(out_str) print "Access expr:", parsed_expr print "Access type:", parsed_type @@ -544,6 +544,11 @@ for (expr, result) in tests: assert parsed_expr == parsed_expr_bis assert parsed_type == parsed_type_bis + parsed_expr_3, parsed_type_3 = mychandler.c_to_expr_and_type(out_str) + assert parsed_expr_3 is not None + assert parsed_expr == parsed_expr_3 + assert parsed_type == parsed_type_3 + expr_new1 = expr_simp(parsed_expr) expr_new2 = expr_simp(expr) print "\t", expr_new1 |