Solidity: Improve test coverage of the Scanner

Created on 31 Jul 2018  路  3Comments  路  Source: ethereum/solidity

libsolidity/parsing/Scanner.cpp has a test coverage of 69% when running the syntax tests, but 92% when also running the semantics (end-to-end) tests.

Should add test cases to the tes/solidity/syntaxTests directory.

Missing cases:

  • unicode escapes
  • upper case hex values
  • multiline comments
  • Token::Dec, Token::AssignSub, Token::AssignBitOr
help wanted testing

All 3 comments

@herrBez thanks that you want to help out! Please create a pull request early so that we have a place for discussion. I'm not too much into how to extract coverage information either, but I think you have to compile with cmake -DCOVERAGE=ON ..; make and then use the codecov tool. If we are lucky, you will get coverage results on the pull request itself (but sometimes they are broken).

Thank you very much for the support. I will try to conclude (hopefully soon!) (I am currently using codecov on my fork to see the test coverage). It is ok to make multiple commits or it is better a single commit with the fix for this issue?

Feel free to do it in whatever way you like. At the end, depending on the amount of changes, a single commit is probably best, but it can always be squashed.

Was this page helpful?
0 / 5 - 0 ratings