This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 198473

Summary: Impossible to use CPPUnit in QT projects
Product: cnd Reporter: johngull
Component: UnitTest SupportAssignee: issues@cnd <issues>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 7.0   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:

Description johngull 2011-05-10 11:56:59 UTC
Hello.
There is bug in makefile generation for unit-testing in Qt projects.
During "Build Tests" process I received next message:
---
make[1]: *** No rule to make target `.build-tests-conf'.  Stop.
---

I tried absolutely same code in usual C++ project and Qt project. For C++ project - everything is fine and tests are runned, but same things for Qt project gave mistake.

In attachment i had added full project for repeating.

Sequence:
1. New Project: C/C++ - C/C++ Qt Application (or C/C++ Qt Static Library)
2. Add to main.cpp sum function:
int sum(int a, int b)
{
    return a + b;
}

3. Right click on main.cpp. Create Test -> New CppUnit Test...

4. Add to test function smth like:
    CPPUNIT_ASSERT_EQUAL(sum(1, 1), 2);

Hope it can be solved fast and added to the update of 7.0 (not to the release of 7.1).

Thank you.
Comment 1 soldatov 2011-05-11 13:59:10 UTC
It is enhancement (limitation of NetBeans C/C++ pack). Yes Unit tests works in "C/C++ Application", "C/C++ Dynamic Library" and "C/C++ Static Library" projects only.