Author Topic: CppUTest support  (Read 192 times)

TKasparek

  • Senior Community Member
  • Posts: 192
  • Hero Points: 24
CppUTest support
« on: September 25, 2018, 09:31:22 pm »
Has anybody been able to accurately tag/use CppUTest framework with color coding in SlickEdit? Just having the tag file generated seems to bring SE to an absolute crawl with every change in window location or edit of a unittest file.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2501
  • Hero Points: 364
Re: CppUTest support
« Reply #1 on: September 26, 2018, 01:27:49 am »
You might want to make sure you only tagged the files under "include".

Also, it looks like this test framework overrides some of the same preprocessor macros as cpptest, so you may be seeing macro expansion that isn't quite right.  I would recommend importing the #defines from include/CppUTest/UtestMacros.h into your workspace C/C++ Preprocessing configuration.

TKasparek

  • Senior Community Member
  • Posts: 192
  • Hero Points: 24
Re: CppUTest support
« Reply #2 on: September 28, 2018, 04:51:56 pm »
This didn't really work for me...

I've always added the pre-processing macros to the language and hadn't realized there was one for the workspace. I gave this a shot. I found a new file in my directory that I need to deal with called <WorkspaceName_cpp.hpp>. It would be nice if it was at least thrown in the workspace tags directory or something.

Importing that file seems to show no macros to import until I first undefine the D_UTestMacros_h pre-processor define that is surrounding all the macros in the file via a #ifndef check.

Still, using your recommendations only seemed to make the macros link to the new *_cpp.hpp generated file. All other color coding was still not there and cursor movement/key input lag is nearly unusable.  :-\  I'll try to generate a project/files and instructions in the next week to demo this.

TKasparek

  • Senior Community Member
  • Posts: 192
  • Hero Points: 24
Re: CppUTest support
« Reply #3 on: October 15, 2018, 06:16:00 pm »
Is there any sort of timing profiling I can enable to help locate where slickedit is hanging when tagging/coloring these files for me? It's really bad. Move the cursor, wait 5 seconds, move the cursor, wait 5 seconds, make an edit, wait 5 seconds...

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2501
  • Hero Points: 364
Re: CppUTest support
« Reply #4 on: October 17, 2018, 02:07:45 pm »
Macro > Slick-C Profiling > Start Profiling...

One thing to keep in mind, sometimes when you add C/C++ preprocessing macros, it is better to add them as no-ops rather than whatever insanity they expand to.  This is especially true for large macros that just expand to statements.