Archived Read Only Forums > SlickEdit 2015 v20 Beta Discussion

Any hope of gtest (Google test) support in v20?

(1/2) > >>

Phil Barila:
Really prefer SE to Eclipse, but I haven't found the right combination of manually defining all the junk in the gtest headers for the SE tagging engine to do the right thing in TEST_F() methods.  Since Eclipse with the CDT does this without any effort on my part, I've been slowly migrating my usage to Eclipse as a matter of survival.  I still use SE, but not nearly as much.  I would really prefer to reverse this imbalance, but it's going to require some effort on the part of SE.

We are looking into this.

I'm a bit confused at what you want out of this. Below is some sample Google Test code:

--- Code: ---TEST(SquareRootTest, PositiveNos) {
    EXPECT_EQ (18.0, square-root (324.0));
    EXPECT_EQ (25.4, square-root (645.16));
    EXPECT_EQ (50.3321, square-root (2533.310224));

TEST (SquareRootTest, ZeroAndNegativeNos) {
    ASSERT_EQ (0.0, square-root (0.0));
    ASSERT_EQ (-1, square-root (-22.0));

--- End code ---

There are some mangled names generated for the above. As far as I can tell, you never call them explicitly in code. I guess you could navigate to them using Find symbol. Is that what you are looking for? If you're looking for something else, please let us know.  Thanks

Something I should mention. I tried adding the Google Test defines and it worked. The Defs tool windows looks really ugly when the code is preprocessed correctly. The Defs tool window looks much better when it's not preprocessed.

Phil Barila:
Thanks for taking a look at it.  What I'd like is for members defined in a test fixture (TEST_F) to be recognized as members.

--- Code: ---#ifndef BaseTest_H_
#define BaseTest_H_

#include "gtest/gtest.h"

class MyClass
    void DoSomething() {}

class BaseTest : public ::testing::Test
        // Executed for Every Test
        BaseTest() {}

        virtual ~BaseTest() {}

        MyClass mMyClass;

#endif // BaseTest_H_

--- End code ---

--- Code: ---#include "BaseTest.h"

TEST_F(BaseTest, testDoSomething)

--- End code ---
I want it to recognize mMyClass as a member of type MyClass and color and complete appropriately.  I haven't been able to make that happen with my attempts at adding the defines.  All I really did was break coloring/completing pretty much everything in the test file.


[0] Message Index

[#] Next page

Go to full version