Author |
Topic |
|
diehard2
Junior Member
19 Posts |
Posted - Jan 14 2010 : 11:43:38 AM
|
Hello, I have a project that uses GTEST. Within the test functions
TEST(FooTest, FooTest_Subtract) {
}
I have no intellisense that is at all useful. For instance, if I type
vector<int> tester();
I will get no intellisense on the tester variable, and VAX won't even come up with it in its list of variables. If I create a function or a main() in the same source file, VAX works as expected.I have rebuilt the symbols in the VAX options pane, and added GTest to the VAX includes, so everything in GTest is also seen by VAX. Thanks for any help.
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Jan 14 2010 : 2:06:18 PM
|
I added ...gtest-1.4.0\\include\\gtest directory to this list:
Tools -> Options... -> Projects and solutions -> VC++ Directories Platform: win32 Show directories for: include files
and included gtest.h but suggestions are working for me:
using VS2008 and VAX1738.
What Visual Assist version do you use? Which Visual Studio do you use? Am I using the framework correctly?
Can you please create a new win32 test project and paste the snippet into its cpp to see whether this snippet is working for you?
#include "gtest.h"
TEST(FooTest, FooTest_Subtract)
{
vector<int> tester();
void func()
{
}
}
|
Edited by - accord on Jan 14 2010 2:18:12 PM |
|
|
diehard2
Junior Member
19 Posts |
Posted - Jan 14 2010 : 2:30:16 PM
|
Hello,
So if I just type
vector<int> tester(); tester.size()
I'm getting intellisense. If I delete tester.size a couple of times (sometimes once, sometimes 2 or 3 times) I lose intellisense in the block. If I delete everything in the block, I get it back for awhile. I also looked at my testing project a bit more. Some blocks (like the one that prompted this post) I have no intellisense. In others, its spotty. In addition, I have red squiggly lines under some variables that are defined directly above and in scope, so it seems as if VAX is getting confused.
i.e.
FooOptions foo(....); Bar d1("...", foo) //foo has a squiggly red line under it.
For some variables I have intellisense, for some I don't. I'm using vs 2008 with the latest release build of vax on your website. We are evaluating the software, so I don't know if there are any differences between evaluation mode and registered. |
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Jan 16 2010 : 10:09:03 AM
|
Still cannot break anything, but two method that usually helps:
First, recursive macro calling is turned off by default to speed up things, but you can turn it on to see if it helps:
http://docs.wholetomato.com?W363
Or you can replace the complex macros by empty ones by putting the following lines into VA's stdafx.h:
#define TEST(test_case_name, test_name)
#define TEST_F(test_fixture, test_name)
VA's stdafx.h is parsed first and only by VA. You can learn more about it and its location here: http://docs.wholetomato.com?W302
You can do it with any macro you don't want VA to mess around. If you do this, you can turn off recursive parsing.
>I also looked at my testing project a bit more. Some blocks (like the one that prompted this post) I have no intellisense. Do you have a test project for this problem? If yes, can you please send it to me, so I can investigate. (in case you are not satisfied with recursive parsing) Please zip up the project and attach it to a request for assistance (and include the TOPIC_ID from the URL of your forum post if applicable, so we can match it up):
http://www.wholetomato.com/support/contact.asp |
Edited by - accord on Jan 16 2010 10:16:57 AM |
|
|
diehard2
Junior Member
19 Posts |
Posted - Jan 19 2010 : 11:34:21 AM
|
Hi accord, setting the registry keys didn't fix it, but adding the #define's to the stdafx.h seems to have done the job. Sorry I can't send the project, the problem I'm seeing is occurring in proprietary code. Thanks for your help.
|
|
|
|
Topic |
|
|
|