cancel
Showing results for 
Search instead for 
Did you mean: 

AQTime Light Coverage Profiler identifies uncovered lines with only brackets or keywords (C++)

SOLVED
Highlighted
ted
New Contributor

AQTime Light Coverage Profiler identifies uncovered lines with only brackets or keywords (C++)

I have some strange Light Coverage result reported by AQTime (8.71.3483.7)

It shows thats the lines containing only brackets (from if-else or try-catch blocks) and `if-else` keywords  are uncovered.

 

An exmaple code:

template<typename T>
class Klass
{
public:
  void do()
  {
    try
    {
      if ( ... )
      {
         //...
      }
      else /* this line is reported as uncovered */
      {
         //...
      }  /* this line is reported as uncovered */
    }
    catch (SomeEx&)
    {
       //...
    }  /* this line is reported as uncovered */
    catch (SomeOtherEx&)
    {
       //...
    }  /* this line is reported as uncovered */
  }
};

The whole code is actually covered but the report shows such lines uncovered.

is it expected behavour?

How can I get rid of it?

 

thanks

 

Tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
ted
New Contributor

Re: AQTime Light Coverage Profiler identifies uncovered lines with only brackets or keywords (C++)

thanks @AlexKaras, it was a good hint.

 

Indeed, I did run Coverage Profiler with none-Release configuration in MSVC.

Without /O options MSVC would generate unreachable jmp instructions for such `else` or `bracket` lines.

It is not wrong but just not nice with MSVC for none-optimzed code generation. Example instruction code generation without /O and with /O options

 

I assume that AQTime profiler just traces if generated instructions are executed or not. That is why I get this strange result.

 

 

 

2 REPLIES 2
Community Hero

Re: AQTime Light Coverage Profiler identifies uncovered lines with only brackets or keywords (C++)

Hi,

 

If all other lines from your example are reported as covered, then I would recommend to address Support directly via the https://support.smartbear.com/message/?prod=AQtime form and let guys know what development environment was used to create your profiled application.

Also I would recommend to double check if all compilation requirements have been met - https://support.smartbear.com/aqtime/docs/profiling-with/prepare-apps/index.html

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
ted
New Contributor

Re: AQTime Light Coverage Profiler identifies uncovered lines with only brackets or keywords (C++)

thanks @AlexKaras, it was a good hint.

 

Indeed, I did run Coverage Profiler with none-Release configuration in MSVC.

Without /O options MSVC would generate unreachable jmp instructions for such `else` or `bracket` lines.

It is not wrong but just not nice with MSVC for none-optimzed code generation. Example instruction code generation without /O and with /O options

 

I assume that AQTime profiler just traces if generated instructions are executed or not. That is why I get this strange result.

 

 

 

New Here?
Join us and watch the welcome video:
6 / 7 API Testing Mistakes Video