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 - Impossible to use CPPUnit in QT projects
Summary: Impossible to use CPPUnit in QT projects
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: UnitTest Support (show other bugs)
Version: 7.0
Hardware: PC Windows 7
: P2 normal with 2 votes (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-10 11:56 UTC by johngull
Modified: 2014-04-14 14:32 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.