0

On the ethereum/solidity project they recently enabled code coverage reporting, and the report is being sent to codecov. I'm reviewing it and I found this weird thing:

Here in line 45 of the Rematerializer.cpp file you can see that the line is white. However, that line is being executed by the YulRematerialiser/do_not_move_out_of_scope test. I confirmed this with the debugger. So, why is this line not colored green? What does it mean when a line has no color?

elopio
  • 191
  • 1
  • 8

1 Answers1

0

The for loop around that is only partially tested it looks like, as it is colored yellow. They don't mention it, but the documentation basically says (when taking the example picture into account too; can't link it as it's download-only) that:

  • Green lines have been run. The # next to them is the number of hits.

  • Red lines have not been run.

  • Yellow lines have been partially run, but have one or more "execution paths" that have not been run, and white lines contained in a yellow area are lines which were not tested because of that.

Not into C/C++, but I'd guess the expression in that if in the loop just before the white line around 45 always failed in testing so it never ran the code in the block. I am almost definitely reading the code wrong in some way though, so that could easily be wrong.

l3l_aze
  • 357
  • 3
  • 12