From da4a9cf58ded89bea1ebf637675c415d8b4e41e6 Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Mon, 4 Nov 2024 09:42:07 +0800 Subject: [PATCH] test: include *.puya.map in hello_world O2 test case to reveal missing path normalization --- examples/hello_world/out_O2/.gitignore | 3 ++ .../HelloWorldContract.approval.puya.map | 54 +++++++++++++++++++ .../out_O2/HelloWorldContract.clear.puya.map | 27 ++++++++++ 3 files changed, 84 insertions(+) create mode 100644 examples/hello_world/out_O2/.gitignore create mode 100644 examples/hello_world/out_O2/HelloWorldContract.approval.puya.map create mode 100644 examples/hello_world/out_O2/HelloWorldContract.clear.puya.map diff --git a/examples/hello_world/out_O2/.gitignore b/examples/hello_world/out_O2/.gitignore new file mode 100644 index 0000000000..eea691ac9b --- /dev/null +++ b/examples/hello_world/out_O2/.gitignore @@ -0,0 +1,3 @@ +# allow source maps in this directory, so we have at least once source map in approvals +# to ensure path normalization is covered +!*.puya.map diff --git a/examples/hello_world/out_O2/HelloWorldContract.approval.puya.map b/examples/hello_world/out_O2/HelloWorldContract.approval.puya.map new file mode 100644 index 0000000000..507ba0f573 --- /dev/null +++ b/examples/hello_world/out_O2/HelloWorldContract.approval.puya.map @@ -0,0 +1,54 @@ +{ + "version": 3, + "sources": [ + "../contract.py" + ], + "mappings": ";AAMY;;;;;;;;;AADG;;;AACH;AAAJ;AACO;;AAAP", + "op_pc_offset": 0, + "pc_events": { + "1": { + "subroutine": "examples.hello_world.contract.HelloWorldContract.approval_program", + "params": {}, + "block": "examples.hello_world.contract.HelloWorldContract.approval_program", + "stack_in": [], + "op": "pushbytes 0x48656c6c6f2c20" + }, + "10": { + "op": "txna ApplicationArgs 0", + "defined_out": [ + "0x48656c6c6f2c20", + "name#0" + ], + "stack_out": [ + "0x48656c6c6f2c20", + "name#0" + ] + }, + "13": { + "op": "concat", + "defined_out": [ + "tmp%0#0" + ], + "stack_out": [ + "tmp%0#0" + ] + }, + "14": { + "op": "log", + "stack_out": [] + }, + "15": { + "op": "pushint 1 // 1", + "defined_out": [ + "1" + ], + "stack_out": [ + "1" + ] + }, + "17": { + "op": "return", + "stack_out": [] + } + } +} \ No newline at end of file diff --git a/examples/hello_world/out_O2/HelloWorldContract.clear.puya.map b/examples/hello_world/out_O2/HelloWorldContract.clear.puya.map new file mode 100644 index 0000000000..6410aa740c --- /dev/null +++ b/examples/hello_world/out_O2/HelloWorldContract.clear.puya.map @@ -0,0 +1,27 @@ +{ + "version": 3, + "sources": [ + "../contract.py" + ], + "mappings": ";AAUe;;AAAP", + "op_pc_offset": 0, + "pc_events": { + "1": { + "subroutine": "examples.hello_world.contract.HelloWorldContract.clear_state_program", + "params": {}, + "block": "examples.hello_world.contract.HelloWorldContract.clear_state_program", + "stack_in": [], + "op": "pushint 1 // 1", + "defined_out": [ + "1" + ], + "stack_out": [ + "1" + ] + }, + "3": { + "op": "return", + "stack_out": [] + } + } +} \ No newline at end of file