Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
dwightguth committed Aug 27, 2024
1 parent 9e5d4bc commit be67e50
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 0 deletions.
97 changes: 97 additions & 0 deletions test/regression/increment.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<solidity>
<k>
.K
</k>
<current-body>
IncTest
</current-body>
<ifaces>
.IfaceCellMap
</ifaces>
<contracts>
<contract>
<contract-id>
IncTest
</contract-id>
<contract-state>
.Map
</contract-state>
<contract-init>
.List
</contract-init>
<contract-fns>
<contract-fn>
<contract-fn-id>
constructor
</contract-fn-id>
<contract-fn-visibility>
public
</contract-fn-visibility>
<contract-fn-arg-types>
.List
</contract-fn-arg-types>
<contract-fn-param-names>
.List
</contract-fn-param-names>
<contract-fn-return-types>
.List
</contract-fn-return-types>
<contract-fn-return-names>
.List
</contract-fn-return-names>
<contract-fn-body>
uint256 x = 0 ; require ( x ++ == 0 , "" , .TypedVals ) ; require ( x == 1 , "" , .TypedVals ) ; require ( x -- == 1 , "" , .TypedVals ) ; require ( x == 0 , "" , .TypedVals ) ; .Statements
</contract-fn-body>
</contract-fn>
</contract-fns>
<contract-events>
.ContractEventCellMap
</contract-events>
</contract>
</contracts>
<exec>
<msg-sender>
1p160
</msg-sender>
<msg-value>
0p256
</msg-value>
<tx-origin>
1p160
</tx-origin>
<this>
2p160
</this>
<this-type>
IncTest
</this-type>
<env>
x |-> var ( 0 , uint256 )
</env>
<store>
0 |-> 0p256
</store>
<call-stack>
.List
</call-stack>
<live-contracts>
<live-contract>
<contract-address>
2p160
</contract-address>
<contract-type>
IncTest
</contract-type>
<contract-storage>
.Map
</contract-storage>
</live-contract>
</live-contracts>
<events>
.List
</events>
<next-address>
3p160
</next-address>
</exec>
</solidity>
12 changes: 12 additions & 0 deletions test/regression/increment.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
pragma solidity ^0.8.24;

contract IncTest {

constructor() {
uint x = 0;
require(x++ == 0, "");
require(x == 1, "");
require(x-- == 1, "");
require(x == 0, "");
}
}
1 change: 1 addition & 0 deletions test/regression/increment.txn
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
create(1, 0, IncTest, )

0 comments on commit be67e50

Please sign in to comment.