Google Test #1.a: Setup Googletest in Netbeans

preview_player
Показать описание
Googletest is one of the best C++ unit test frameworks today. This video shows you how to setup and run Googletest in Netbeans.

Рекомендации по теме
Комментарии
Автор

Thank you!  I have setting up my IDEs and testing frameworks.  They never seem to "just work."  Your video reduced the pain an order of magnitude!

ericrussell
Автор

I tried to do the same steps as on the video in Netbeans 8.2, but got a linker error. For example, undefined reference to If you have a similar problem you just need to add string to Linker -> Input -> Additional options. Hope, it'll help you!

viktorilvovskyi
Автор

Created test project as a static library, now it works fine.

mailtomemailtome
Автор

Dear Bo Qian,

  Thank you for your very instructive video.  I have followed your steps carefully.  When I run my first real test (the very end of your video), the test clearly runs and passes, but I get an error on the global environment tear-down: 

clang: error: no such file or directory: '.test-post'

I am running Netbeans on a mac OSX.

Looking around, this looks like it is a small error, but I don't know how to fix it.  Is it a bad Netbeans setup?

Many thanks.
Loeksnokes

loeksnokes
Автор

Thanks! Very useful.
FYI, ran into an issue where I needed to add -lpthread to the linker. I'm on Arch Linux.

MrDcatalano
Автор

Stuck on step 3 Create a unit test project.. Is this normal C++ application ?
For this step I created C++ application project added MyStack.cpp and Mystack.h added include paths and linked googletest project.. but when I attempt to Test it, the build fails.. undefined reference to `WinMain'
I am using netbeans IDE 8.0 on Windows 7 64bit platform.  Am I missing any thing ? Should this test project be created in a different way ?

mailtomemailtome
Автор

This is great stuff. Can you do similar stuff for cppUnit and Cunit?

chewhouming
Автор

Hi Bo!!. Your videos are very helpful.. Can I request you some thing.. Can you upload a tutorial on gmock(if possible).. Like all other videos.. even the videos on gmock.. will definitely makes sense to lot of people.. like me.. 

ultimateshivau
Автор

Thanx a lot brother, keep up the good work :)

parth_
Автор

Thanks for a video. However, I do have a problem. My build step fails with:

g++ -c -g -I../gtest-1.7.0 -I../gtest-1.7.0/include -MMD -MP -MF -o
g++: cannot specify -o with -c or -S and multiple compilations
gmake[2]: *** Error 1

Any ideas why this might be?

Thanks.

srki
Автор

Never mind, ti was the old version of gcc (2.9) that was an issue.

srki
Автор

Is this process similar for gmock? thanks

santicomp