File tree Expand file tree Collapse file tree
framework/src/test/resources/soliditycode_0.5.15 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11
2-
3- contract arrayLength {
2+ contract Test {
43 byte [] a;
5- uint256 [] IntergerArray;
6- bytes bs;
74
8- // arrary length
9- function arrayPushValue () public returns (byte [] memory ){
10- a = new byte [](1 );
5+ function ChangeSize () external returns (byte [] memory ) {
116 a.push (0x01 );
12- return a;
13- }
7+ a.length = 3 ;
148
15- function arrayPush () public returns (byte [] memory ){
16- a = new byte [](1 );
17- a.push ();
18- return a;
19- }
9+ a.length ++ ;
10+ a.length -- ;
11+ a.length -- ;
2012
21- function arrayPop () public returns (byte [] memory ){
22- a = new byte [](1 );
2313 a.pop ();
2414 return a;
2515 }
26-
27- // arrary push/pop return Value
28- function arrayPushValueReturn () public {
29- a = new byte [](1 );
30- return a.push (0x01 );
31- }
32-
33- function arrayPushReturn () public returns (bytes1 ){
34- a = new byte [](1 );
35- return a.push ();
36- }
37-
38- function arrayPopReturn () public {
39- a = new byte [](1 );
40- return a.pop ();
41- }
42-
43- function uint256ArrayPushValue () public returns (byte [] memory ){
44- IntergerArray = [1 ,2 ,3 ];
45- IntergerArray.push ();
46- return a;
47- }
48-
49-
50- // bytes
51- function bytesPushValue () public {
52-
53- return bs.push (0x01 );
54- }
55-
56- function bytesPush () public returns (bytes1 ){
57- return bs.push ();
58- }
59-
60- function bytesPop () public {
61- return bs.pop ();
62- }
63-
6416}
You can’t perform that action at this time.
0 commit comments