Skip to content

Commit

Permalink
test: include *.puya.map in hello_world O2 test case to reveal missin…
Browse files Browse the repository at this point in the history
…g path normalization
  • Loading branch information
daniel-makerx committed Nov 4, 2024
1 parent 2358294 commit da4a9cf
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/hello_world/out_O2/.gitignore
Original file line number Diff line number Diff line change
@@ -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
54 changes: 54 additions & 0 deletions examples/hello_world/out_O2/HelloWorldContract.approval.puya.map
Original file line number Diff line number Diff line change
@@ -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": []
}
}
}
27 changes: 27 additions & 0 deletions examples/hello_world/out_O2/HelloWorldContract.clear.puya.map
Original file line number Diff line number Diff line change
@@ -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": []
}
}
}

0 comments on commit da4a9cf

Please sign in to comment.