File tree Expand file tree Collapse file tree
tests/format/NumberLiteral Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: MIT
2+ pragma solidity 0.8.23 ;
3+
4+ contract NumberLiteral {
5+ function numbers ()public {
6+ 2 ether ;
7+ 5 days ;
8+ 2.3e5 ;
9+ 1000000e-2 ;
10+ .1 ;
11+ 1_000_000 ;
12+ }
13+ }
Original file line number Diff line number Diff line change 1+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+ exports [` NumberLiteral.sol format 1` ] = `
4+ ====================================options=====================================
5+ parsers: ["solidity-parse"]
6+ printWidth: 80
7+ | printWidth
8+ =====================================input======================================
9+ // SPDX-License-Identifier: MIT
10+ pragma solidity 0.8.23;
11+
12+ contract NumberLiteral {
13+ function numbers()public {
14+ 2 ether ;
15+ 5 days ;
16+ 2.3e5 ;
17+ 1000000e-2 ;
18+ .1 ;
19+ 1_000_000 ;
20+ }
21+ }
22+
23+ =====================================output=====================================
24+ // SPDX-License-Identifier: MIT
25+ pragma solidity 0.8.23;
26+
27+ contract NumberLiteral {
28+ function numbers() public {
29+ 2 ether ;
30+ 5 days ;
31+ 2.3e5 ;
32+ 1000000e-2 ;
33+ .1 ;
34+ 1_000_000 ;
35+ }
36+ }
37+
38+ ================================================================================
39+ ` ;
Original file line number Diff line number Diff line change 1+ run_spec ( import . meta, [ 'solidity-parse' ] ) ;
You can’t perform that action at this time.
0 commit comments