hyperledger / solang

Solidity Compiler for Solana and Polkadot
https://solang.readthedocs.io/
Apache License 2.0
1.23k stars 206 forks source link

Update tests to solc v0.8.22 and fix a few tests #1579

Closed seanyoung closed 8 months ago

seanyoung commented 8 months ago
codecov[bot] commented 8 months ago

Codecov Report

Merging #1579 (89045f5) into main (979cad9) will increase coverage by 0.15%. Report is 1 commits behind head on main. The diff coverage is 100.00%.

:exclamation: Current head 89045f5 differs from pull request most recent head 4b55a80. Consider uploading reports for the commit 4b55a80 to get more accurate results

@@            Coverage Diff             @@
##             main    #1579      +/-   ##
==========================================
+ Coverage   87.40%   87.55%   +0.15%     
==========================================
  Files         133      133              
  Lines       64110    64118       +8     
==========================================
+ Hits        56033    56137     +104     
+ Misses       8077     7981      -96     
Files Coverage Δ
src/abi/mod.rs 89.18% <100.00%> (+13.51%) :arrow_up:
src/abi/polkadot.rs 97.75% <100.00%> (ø)
src/bin/solang.rs 68.29% <100.00%> (+0.88%) :arrow_up:
src/sema/eval.rs 87.42% <100.00%> (+0.07%) :arrow_up:
src/sema/expression/assign.rs 77.05% <100.00%> (ø)
src/sema/expression/literals.rs 89.91% <100.00%> (ø)
src/sema/expression/resolve_expression.rs 95.90% <100.00%> (ø)
src/sema/expression/subscript.rs 98.44% <100.00%> (ø)
src/sema/expression/variable.rs 91.05% <ø> (ø)
src/sema/functions.rs 93.14% <100.00%> (ø)
... and 3 more

... and 5 files with indirect coverage changes

seanyoung commented 8 months ago

I am not sure why the coverage bot is complaining. I get an overall failure but in all the files the coverage has gone up or stayed the same.

LucasSte commented 8 months ago

I am not sure why the coverage bot is complaining. I get an overall failure but in all the files the coverage has gone up or stayed the same.

In src/sema/tags.rs, lines 101-104 were previously covered by test, but are not covered anymore. Please, check the indirect changes in the coverage report.

seanyoung commented 8 months ago

In src/sema/tags.rs, lines 101-104 were previously covered by test, but are not covered anymore. Please, check the indirect changes in the coverage report.

Good point. I've added a bunch of test and now the coverage does not decrease (in fact, it increases).

There are some areas which are still uncovered, but I have not decided how to fix that. For example for the dot tests I think we need a solidity file with all the syntax in it (or just a minimal set of files). That's not in this PR.