[Boost-users] Using boost unit test with QtCreator

512 views
Skip to first unread message

Wilhelm

unread,
Aug 24, 2011, 6:33:38 AM8/24/11
to boost...@lists.boost.org
Hi all,

if one uses the boost unit test macros (see below), qtcreator marks the
BOOST_CHECK(...) macros as syntax error (expected ;):

#include <boost/test/unit_test.hpp>

#include "person.h"

BOOST_AUTO_TEST_CASE(Person1)
{
Person p("Hugo", "Tester");
BOOST_CHECK(p.firstname() == "Hugo");
BOOST_CHECK(p.lastname() == "Tester");
}

Does anybody know how to avoid this (yes, I can use the Qt unit testing
framework, but thats not a solution in this special case)?

--
Wilhelm
_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Ovanes Markarian

unread,
Aug 24, 2011, 7:18:57 AM8/24/11
to boost...@lists.boost.org
Hi!

On Wed, Aug 24, 2011 at 12:33 PM, Wilhelm <wilhel...@fh-kl.de> wrote:
[...]
 
Does anybody know how to avoid this (yes, I can use the Qt unit testing
framework, but thats not a solution in this special case)?

IMO Boost Test Framework is fully C++ compliant and compiles well by various compilers. If there are problems with Qt Creator, report a bug to Qt.


With Kind Regards,
Ovanes

Wilhelm

unread,
Aug 24, 2011, 7:54:20 AM8/24/11
to boost...@lists.boost.org

Yes, it compiles well!

But the syntax-parser of qtcreator reports an error (red wave-underline
of BOOST_CHECK macro)

>
>
> With Kind Regards,
> Ovanes

Ovanes Markarian

unread,
Aug 24, 2011, 8:02:06 AM8/24/11
to boost...@lists.boost.org
On Wed, Aug 24, 2011 at 1:54 PM, Wilhelm <wilhel...@fh-kl.de> wrote:
Am 24.08.2011 13:18, schrieb Ovanes Markarian:
> Hi!
>
> On Wed, Aug 24, 2011 at 12:33 PM, Wilhelm <wilhel...@fh-kl.de
> <mailto:wilhel...@fh-kl.de>> wrote:
>
>     [...]
>
>
>
>     Does anybody know how to avoid this (yes, I can use the Qt unit testing
>     framework, but thats not a solution in this special case)?
>
>
> IMO Boost Test Framework is fully C++ compliant and compiles well by
> various compilers. If there are problems with Qt Creator, report a bug
> to Qt.

Yes, it compiles well!

But the syntax-parser of qtcreator reports an error (red wave-underline
of BOOST_CHECK macro)

I understood your point before, and that is why I wrote you to file a bug to QtCreator.
 
With Kind Regards,
Ovanes

Richard

unread,
Aug 26, 2011, 2:29:46 PM8/26/11
to boost...@lists.boost.org
[Please do not mail me a copy of your followup]

boost...@lists.boost.org spake the secret code
<4E54E66C...@fh-kl.de> thusly:

>But the syntax-parser of qtcreator reports an error (red wave-underline
>of BOOST_CHECK macro)

Then report a bug against qtcreator. This is not a problem with
Boost.Test.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

Reply all
Reply to author
Forward
0 new messages