-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathformat.test.js.snap
More file actions
53 lines (44 loc) · 1.73 KB
/
format.test.js.snap
File metadata and controls
53 lines (44 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`Immutable.sol format 1`] = `
====================================options=====================================
parsers: ["slang"]
printWidth: 80
| printWidth
=====================================input======================================
pragma solidity >0.6.4 <0.7.0;
contract Immutable {
uint constant X = 32**22 + 8;
string constant TEXT = "abc";
bytes32 constant MY_HASH = keccak256("abc");
uint immutable decimals;
uint immutable maxBalance;
address immutable owner = msg.sender;
constructor(uint _decimals, address _reference) public {
decimals = _decimals;
// Assignments to immutables can even access the environment.
maxBalance = _reference.balance;
}
function isBalanceTooHigh(address _other) public view returns (bool) {
return _other.balance > maxBalance;
}
}
=====================================output=====================================
pragma solidity >0.6.4 <0.7.0;
contract Immutable {
uint constant X = 32 ** 22 + 8;
string constant TEXT = "abc";
bytes32 constant MY_HASH = keccak256("abc");
uint immutable decimals;
uint immutable maxBalance;
address immutable owner = msg.sender;
constructor(uint _decimals, address _reference) public {
decimals = _decimals;
// Assignments to immutables can even access the environment.
maxBalance = _reference.balance;
}
function isBalanceTooHigh(address _other) public view returns (bool) {
return _other.balance > maxBalance;
}
}
================================================================================
`;