Skip to content

Commit 9d170b7

Browse files
committed
passing tests
1 parent bab4e1e commit 9d170b7

21 files changed

+764
-756
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
"knip": "^5.75.1",
108108
"lines-and-columns": "^2.0.4",
109109
"prettier": "^3.7.4",
110-
"solc": "^0.8.32",
110+
"solc": "^0.8.33",
111111
"ts-loader": "^9.5.4",
112112
"ts-node": "^10.9.2",
113113
"typescript": "^5.9.3",
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.32;
2+
pragma solidity 0.8.33;
33

44
contract HexLiteral {
5-
bytes8 hex1 = hex'DeadBeef';
6-
bytes8 hex2 = hex"DeadBeef";
5+
bytes8 hex1 = hex'DeadBeef';
6+
bytes8 hex2 = hex'DeadBeef';
77
}

tests/format/HexLiteral/__snapshots__/format.test.js.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ singleQuote: false
88
| printWidth
99
=====================================input======================================
1010
// SPDX-License-Identifier: MIT
11-
pragma solidity 0.8.32;
11+
pragma solidity 0.8.33;
1212
1313
contract HexLiteral {
1414
bytes8 hex1 = hex'DeadBeef';
@@ -17,7 +17,7 @@ contract HexLiteral {
1717
1818
=====================================output=====================================
1919
// SPDX-License-Identifier: MIT
20-
pragma solidity 0.8.32;
20+
pragma solidity 0.8.33;
2121
2222
contract HexLiteral {
2323
bytes8 hex1 = hex"DeadBeef";
@@ -35,7 +35,7 @@ singleQuote: true
3535
| printWidth
3636
=====================================input======================================
3737
// SPDX-License-Identifier: MIT
38-
pragma solidity 0.8.32;
38+
pragma solidity 0.8.33;
3939
4040
contract HexLiteral {
4141
bytes8 hex1 = hex'DeadBeef';
@@ -44,7 +44,7 @@ contract HexLiteral {
4444
4545
=====================================output=====================================
4646
// SPDX-License-Identifier: MIT
47-
pragma solidity 0.8.32;
47+
pragma solidity 0.8.33;
4848
4949
contract HexLiteral {
5050
bytes8 hex1 = hex'DeadBeef';
Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.32;
2+
pragma solidity 0.8.33;
33

44
contract ModifierDefinitions {
5-
// We enforce the use of parentheses in modifiers without parameters.
6-
modifier emptyParams {_;}
7-
modifier noParams() {_;}
5+
// We enforce the use of parentheses in modifiers without parameters.
6+
modifier emptyParams() {
7+
_;
8+
}
9+
modifier noParams() {
10+
_;
11+
}
812
}
913

1014
contract ModifierInvocations is ModifierDefinitions {
11-
// We can't differentiate between constructor calls or modifiers, so we keep
12-
// parentheses untouched in constructors.
13-
constructor () emptyParams noParams() ModifierDefinitions() {}
15+
// We can't differentiate between constructor calls or modifiers, so we keep
16+
// parentheses untouched in constructors.
17+
constructor() emptyParams noParams() ModifierDefinitions() {}
1418

15-
// We remove parentheses in modifiers without arguments.
16-
function test() public emptyParams noParams() {}
19+
// We remove parentheses in modifiers without arguments.
20+
function test() public emptyParams noParams {}
1721
}

tests/format/ModifierInvocations/__snapshots__/format.test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ printWidth: 80
77
| printWidth
88
=====================================input======================================
99
// SPDX-License-Identifier: MIT
10-
pragma solidity 0.8.32;
10+
pragma solidity 0.8.33;
1111
1212
contract ModifierDefinitions {
1313
// We enforce the use of parentheses in modifiers without parameters.
@@ -26,7 +26,7 @@ contract ModifierInvocations is ModifierDefinitions {
2626
2727
=====================================output=====================================
2828
// SPDX-License-Identifier: MIT
29-
pragma solidity 0.8.32;
29+
pragma solidity 0.8.33;
3030
3131
contract ModifierDefinitions {
3232
// We enforce the use of parentheses in modifiers without parameters.

tests/format/NumberLiteral/NumberLiteral.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.32;
2+
pragma solidity 0.8.33;
33

44
contract NumberLiteral {
55
function numbers()public {

tests/format/NumberLiteral/__snapshots__/format.test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ printWidth: 80
77
| printWidth
88
=====================================input======================================
99
// SPDX-License-Identifier: MIT
10-
pragma solidity 0.8.32;
10+
pragma solidity 0.8.33;
1111
1212
contract NumberLiteral {
1313
function numbers()public {
@@ -22,7 +22,7 @@ contract NumberLiteral {
2222
2323
=====================================output=====================================
2424
// SPDX-License-Identifier: MIT
25-
pragma solidity 0.8.32;
25+
pragma solidity 0.8.33;
2626
2727
contract NumberLiteral {
2828
function numbers() public {
Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,92 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.32;
2+
pragma solidity 0.8.33;
33

44
contract AddNoParentheses {
5-
function addAdd(uint256 a, uint256 b, uint256 c)
6-
public
7-
pure
8-
returns (uint256)
9-
{
5+
function addAdd(
6+
uint256 a,
7+
uint256 b,
8+
uint256 c
9+
) public pure returns (uint256) {
1010
return a + b + c;
1111
}
1212

13-
function addSub(uint256 a, uint256 b, uint256 c)
14-
public
15-
pure
16-
returns (uint256)
17-
{
13+
function addSub(
14+
uint256 a,
15+
uint256 b,
16+
uint256 c
17+
) public pure returns (uint256) {
1818
return a + b - c;
1919
}
2020

21-
function addMul(uint256 a, uint256 b, uint256 c)
22-
public
23-
pure
24-
returns (uint256)
25-
{
21+
function addMul(
22+
uint256 a,
23+
uint256 b,
24+
uint256 c
25+
) public pure returns (uint256) {
2626
return a + b * c;
2727
}
2828

29-
function addDiv(uint256 a, uint256 b, uint256 c)
30-
public
31-
pure
32-
returns (uint256)
33-
{
29+
function addDiv(
30+
uint256 a,
31+
uint256 b,
32+
uint256 c
33+
) public pure returns (uint256) {
3434
return a + b / c;
3535
}
3636

37-
function addMod(uint256 a, uint256 b, uint256 c)
38-
public
39-
pure
40-
returns (uint256)
41-
{
42-
return a + b % c;
37+
function addMod(
38+
uint256 a,
39+
uint256 b,
40+
uint256 c
41+
) public pure returns (uint256) {
42+
return a + (b % c);
4343
}
4444

45-
function addExp(uint256 a, uint256 b, uint256 c)
46-
public
47-
pure
48-
returns (uint256)
49-
{
45+
function addExp(
46+
uint256 a,
47+
uint256 b,
48+
uint256 c
49+
) public pure returns (uint256) {
5050
return a + b ** c;
5151
}
5252

53-
function addShiftL(uint256 a, uint256 b, uint256 c)
54-
public
55-
pure
56-
returns (uint256)
57-
{
58-
return a + b << c;
53+
function addShiftL(
54+
uint256 a,
55+
uint256 b,
56+
uint256 c
57+
) public pure returns (uint256) {
58+
return (a + b) << c;
5959
}
6060

61-
function addShiftR(uint256 a, uint256 b, uint256 c)
62-
public
63-
pure
64-
returns (uint256)
65-
{
66-
return a + b >> c;
61+
function addShiftR(
62+
uint256 a,
63+
uint256 b,
64+
uint256 c
65+
) public pure returns (uint256) {
66+
return (a + b) >> c;
6767
}
6868

69-
function addBitAnd(uint256 a, uint256 b, uint256 c)
70-
public
71-
pure
72-
returns (uint256)
73-
{
74-
return a + b & c;
69+
function addBitAnd(
70+
uint256 a,
71+
uint256 b,
72+
uint256 c
73+
) public pure returns (uint256) {
74+
return (a + b) & c;
7575
}
7676

77-
function addBitOr(uint256 a, uint256 b, uint256 c)
78-
public
79-
pure
80-
returns (uint256)
81-
{
82-
return a + b | c;
77+
function addBitOr(
78+
uint256 a,
79+
uint256 b,
80+
uint256 c
81+
) public pure returns (uint256) {
82+
return (a + b) | c;
8383
}
8484

85-
function addBitXor(uint256 a, uint256 b, uint256 c)
86-
public
87-
pure
88-
returns (uint256)
89-
{
90-
return a + b ^ c;
85+
function addBitXor(
86+
uint256 a,
87+
uint256 b,
88+
uint256 c
89+
) public pure returns (uint256) {
90+
return (a + b) ^ c;
9191
}
9292
}

0 commit comments

Comments
 (0)