user3360398
user3360398

Reputation:

unit test in eclipse g++

I am using Eclipse to develop some projects and implement unit test by using google test. everything was fine this morning. I can build project and run unit tests. however, after i commit the local changes and then pull the codes from repository using git tortoise, the unit tests stopped working any more. I still can build the project.

I got msg:

Unknown error during parsing Google Test module output: unexpected test module output

this is the msg in the console window:

The target endianness is set automatically (currently little endian)
[New Thread 4496.0x520]

and the project would stop running before we even step into the main function in the unit test. Since, the compiler gave me so little info, i wonder if any one here might have a clue.

Upvotes: 1

Views: 2286

Answers (2)

Denis
Denis

Reputation: 758

It can be a little irrelevant already, but I had the same problem, then I noticed wrong C++ Aplication value for my GoogleTest Configuration, changed it and now everything is fine.

I had the option for Debug config there. (Run -> Run Configurations... -> C/C++ Aplication). Eclipse changed it itself somehow.

Upvotes: 0

ewayzhan
ewayzhan

Reputation: 11

I ran into the error msg "...:unexpected test module output" when I added a main function and DID NOT exclude it from test build (and apparently g++ linker did not complain about same symbol error, you should be able to see it from the build msg for test build).

I excluded my app main from test build (right click on your app main, go to Resources Configuration, then Exclude from Build..., and finally check your test build and click OK), the test ran without any problem.

Upvotes: 1

Related Questions