1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-13 03:05:39 +02:00
Commit graph

14 commits

Author SHA1 Message Date
Simon Marchi
9462c1db24 Bug 399494 - Consider all variable objects as not complex
There are cases where we consider some variables as complex when they
are not.  In particular, if a pointer is declared using a typedef, is
will be considered complex with the current code.  This is because it
has a child (the pointed value), but CDT doesn't know it's a pointer.

One of the consequence is that we assume the value is not modifiable.
Therefore, we won't update its value when it changes, and we won't let
the user edit it.

Initially I thought it would be safe to assume that variables with two
or more children are complex, but pointers to structures have as many
children as the structure has fields.  Therefore, a pointer to a
structure, declared as a typedef, will still be wrongfully considered as
complex.  Since there's no easy way to know for sure whether a variable
is complex, just assume everything is simple.

I added a test to verify that the value of a pointer declared using a
typedef will update correctly in CDT as it changes in the program.
There are two distinct scenarios, pointers that are variables and
pointers that are fields of structures.  Instead of adding content to
testUpdateOfPointer, I decided to make a similar test method,
testUpdateOfPointerTypedef.  The original test method was getting too
long and was difficult to follow.  I think it's good to keep them short
and focused.

Another test verifies that the same kind of pointer can properly be
written/modified by the user.

Change-Id: If43b3b6e49cd4a20ea929c2a096745a32de14cd0
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2017-04-28 10:59:24 -04:00
Simon Marchi
e14b87a88f Use line tags in MIExpressionsTest.testUpdateOfPointer
Running to different points of the test program using line tags is
easier and safer than stepping a certain number of times.  Since I want
to modify this test to add a pointer-behind-typedef test, I thought it
would be good to first convert it to line tags.

I also took the liberty of giving more meaningful names to the structure
fields, even though it doesn't change anything in the test.

Change-Id: Ife7e2ae8557789dfc7403df71ba5126ca84b80e0
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2017-03-06 10:44:15 -05:00
Marc Khouzam
8c15651c03 Bug 436349 - JUnit test for step-return for a method returning void
Change-Id: Ia449c9f599e6c5c3af9e26b4014ade6a12ae58c3
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/27735
Tested-by: Hudson CI
2014-06-02 13:12:57 -04:00
Marc Khouzam
90648530f8 Bug 432888 - Missing rm.done() for a fetched child of an expression
Change-Id: Ia5b43d57d2bc0354786c5d276e091749fa64a87b
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/25108
2014-04-16 05:46:52 -04:00
Marc Khouzam
2a935a9926 Bug 341731 - Show values returned from function calls when doing a
step-return operation

Change-Id: I4ac5c64a940ffcbe75b21618a74f2c4eba93d27e
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/15377
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
IP-Clean: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
IP-Clean: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
Tested-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
2014-02-13 14:38:56 -05:00
Marc Khouzam
b1052736a1 Bug Bug 382692 - Update MIExpressions JUnit tests to current CDT havior
Change-Id: I2de2b0b28774a4ee311ba76f54a71ac2f4735628
Reviewed-on: https://git.eclipse.org/r/13522
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2013-06-03 16:31:04 -04:00
Marc Khouzam
1ef180e2ab Bug 381868: JUnit tests for casting expressions
Change-Id: I9e8c9986db8fac2599eb8f28cc60d42010d17a93
Reviewed-on: https://git.eclipse.org/r/6427
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2012-06-19 12:51:13 -04:00
Marc Khouzam
cfff2b91fb Bug 376901: JUnit tests for RTTI feature
Change-Id: Id72d0d170b8f78201a36d1f95da5ca7a3d07cfa5
Reviewed-on: https://git.eclipse.org/r/5868
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2012-05-07 16:11:51 -04:00
Marc Khouzam
ad2208cc77 Bug 365541: Extra JUnit tests for partitions. Also, don't look for all the children of array_foo as it requires over 14000 MI commands, and makes the test take over 30 seconds. 2012-01-26 14:22:22 -05:00
Mikhail Khodjaiants
15ab0165f1 Bug 365541 - View an array variable whose length is very long (such as
10000) in the editor or Variable View, will cause the interface to die.
2012-01-26 11:59:27 -05:00
Marc Khouzam
6559679143 Bug 320277: More JUnit test to make sure we properly view variables of base class in derived class 2010-09-09 20:34:31 +00:00
Marc Khouzam
ffd8caf56d Bug 320277: JUnit test to make sure we properly view variables of base class in derived class 2010-09-09 12:34:11 +00:00
John Cortell
af21820551 Various expression tests where failing on Windows because of subtle differences in the compiler and the line tables it generates, and perhaps scoping behaviors. The code would end up on the trailing brace of a function, and all variables are out of scope there. 2010-05-25 23:01:40 +00:00
Pawel Piech
5b47187366 Migrated DSF and DSF-GDB to the CDT project. 2009-01-08 21:08:05 +00:00