Skip to content

Commit 5df1b1b

Browse files
committed
Add combined_json_with_userdoc to command line tests
1 parent 3d38758 commit 5df1b1b

File tree

6 files changed

+36
-8
lines changed

6 files changed

+36
-8
lines changed

test/cmdlineTests/ast_compact_json_no_pretty_json/c.sol

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// SPDX-License-Identifier: GPL-3.0
22
pragma solidity >=0.0;
33

4-
import "./c.sol";
4+
contract C {}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
JSON AST (compact format):
22

33

4-
======= ast_compact_json_no_pretty_json/c.sol =======
5-
{"absolutePath":"ast_compact_json_no_pretty_json/c.sol","exportedSymbols":{"C":[5]},"id":6,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":4,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:0"},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":5,"linearizedBaseContracts":[5],"name":"C","nameLocation":"69:1:0","nodeType":"ContractDefinition","nodes":[],"scope":6,"src":"60:13:0","usedErrors":[]}],"src":"36:38:0"}
64
======= ast_compact_json_no_pretty_json/input.sol =======
7-
{"absolutePath":"ast_compact_json_no_pretty_json/input.sol","exportedSymbols":{"C":[5]},"id":3,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:1"},{"absolutePath":"ast_compact_json_no_pretty_json/c.sol","file":"./c.sol","id":2,"nameLocation":"-1:-1:-1","nodeType":"ImportDirective","scope":3,"sourceUnit":6,"src":"60:17:1","symbolAliases":[],"unitAlias":""}],"src":"36:42:1"}
5+
{"absolutePath":"ast_compact_json_no_pretty_json/input.sol","exportedSymbols":{"C":[2]},"id":3,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:0"},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":2,"linearizedBaseContracts":[2],"name":"C","nameLocation":"69:1:0","nodeType":"ContractDefinition","nodes":[],"scope":3,"src":"60:13:0","usedErrors":[]}],"src":"36:38:0"}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--combined-json userdoc --pretty-json --allow-paths .
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// SPDX-License-Identifier: GPL-3.0
2+
pragma solidity >=0.0;
3+
4+
/// @notice Description for users.
5+
contract C {}
6+
7+
/// @dev Description for developers.
8+
contract D {}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"contracts":
3+
{
4+
"combined_json_with_userdoc/input.sol:C":
5+
{
6+
"userdoc":
7+
{
8+
"kind": "user",
9+
"methods": {},
10+
"notice": "Description for users.",
11+
"version": 1
12+
}
13+
},
14+
"combined_json_with_userdoc/input.sol:D":
15+
{
16+
"userdoc":
17+
{
18+
"kind": "user",
19+
"methods": {},
20+
"version": 1
21+
}
22+
}
23+
},
24+
"version": "<VERSION REMOVED>"
25+
}

0 commit comments

Comments
 (0)