Add testcase

pull/1442/head
Josselin Feist 2 years ago
parent c15e88d944
commit 997b6b5fe3
  1. BIN
      tests/ast-parsing/compile/library_event-0.8.16.sol-0.8.16-compact.zip
  2. 6
      tests/ast-parsing/expected/library_event-0.8.16.sol-0.8.16-compact.json
  3. 12
      tests/ast-parsing/library_event-0.8.16.sol
  4. 1
      tests/test_ast_parsing.py

@ -0,0 +1,6 @@
{
"Lib": {},
"Test": {
"foo()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n"
}
}

@ -0,0 +1,12 @@
pragma solidity 0.8.16;
library Lib {
event Event();
}
contract Test {
function foo() external {
emit Lib.Event(); // This line specifically
}
}

@ -424,6 +424,7 @@ ALL_TESTS = [
Test("free_functions/new_operator.sol", ["0.8.12"]), Test("free_functions/new_operator.sol", ["0.8.12"]),
Test("free_functions/library_constant_function_collision.sol", ["0.8.12"]), Test("free_functions/library_constant_function_collision.sol", ["0.8.12"]),
Test("ternary-with-max.sol", ["0.8.15"]), Test("ternary-with-max.sol", ["0.8.15"]),
Test("library_event-0.8.16.sol", ["0.8.16"])
] ]
# create the output folder if needed # create the output folder if needed
try: try:

Loading…
Cancel
Save