Re[2]: [kdevelop] debuggers/gdb/unittests: Fix gdb testCatchpoint() unit test.

Vlas Puhov vlas.puhov at mail.ru
Tue Jul 16 18:57:38 UTC 2013


 It's pretty simple: If you open debugeeexception.cpp file you'll notice, that on 29 line there is no local variables yet. The only variables that can be accesible is main's function arguments. So, before your commit all gdb's unittests were passing ok, but when you've removed all arguments from main function, there is no more local variables(at least my compiler says there is none, but seems like yours tells there is one, that's why this stuff is compiler specific) and this test isn't passed anymore. Anyway why did we check it in the first place?  It has nothing to do with exception handling.
PS: I feel really bad about reverting your commit like that :(



On Tuesday 16 july 2013, 18:08 +02:00 Milian Wolff <mail at milianw.de>:wrote:
>Why? This should work, there is a local variable and we should find it. Why 
>does it not work for you?
>
>Please, don't just revert stuff like that, rather please try to contact me 
>e.g. on IRC or via  kdevelop-devel at kde.org and point out what is broken and 
>why.
>
>Disabling code like this is definitely not worth a "fix unit test" commit 
>message. If at all, the code should be _removed_ and the commit added to the 
>commit message.
>
>Anyhow, please explain why this is supposedly compiler specific and/or why 
>this is not working for you.
>
>PS: please direct all answers to kdevelop-devel.
>
>Bye
>
>On Tuesday 16 July 2013 12:21:26 Vlas Puhov wrote:
>> Git commit fa9839a5aabb2c62c5bdd2bfe155d9349289a0e0 by Vlas Puhov.
>> Committed on 16/07/2013 at 12:12.
>> Pushed by vpuhov into branch 'master'.
>> 
>> Fix gdb testCatchpoint() unit test.
>> 
>> CCMAIL:  mail at milianw.de
>> 
>> M  +2    -1    debuggers/gdb/unittests/gdbtest.cpp
>> 
>>  http://commits.kde.org/kdevelop/fa9839a5aabb2c62c5bdd2bfe155d9349289a0e0
>> 
>> diff --git a/debuggers/gdb/unittests/gdbtest.cpp
>> b/debuggers/gdb/unittests/gdbtest.cpp index e860ab6..983f2c8 100644
>> --- a/debuggers/gdb/unittests/gdbtest.cpp
>> +++ b/debuggers/gdb/unittests/gdbtest.cpp
>> @@ -1570,7 +1570,8 @@ void GdbTest::testCatchpoint()
>> 
>>      QModelIndex i = variableCollection()->index(1, 0);
>>      COMPARE_DATA(i, "Locals");
>> -    QCOMPARE(variableCollection()->rowCount(i), 1);
>> +   // Don't check it, because it depends on compiler version/type, and not
>> so important for current test. +   //
>> QCOMPARE(variableCollection()->rowCount(i), 1);
>> 
>>      session->addCommand(new GDBCommand(GDBMI::NonMI, "catch throw"));
>>      session->run();
>-- 
>Milian Wolff
>mail at milianw.de
>http://milianw.de


-- 
Vlas Puhov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130716/1aa3e333/attachment.html>


More information about the KDevelop-devel mailing list