2008-02-13 20:57:46 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int gIntVar = 543;
|
|
|
|
double gDoubleVar = 543.543;
|
|
|
|
char gCharVar = 'g';
|
|
|
|
bool gBoolVar = false;
|
|
|
|
|
|
|
|
int gIntArray[2] = {987, 654};
|
|
|
|
double gDoubleArray[2] = {987.654, 654.321};
|
|
|
|
char gCharArray[2] = {'g', 'd'};
|
|
|
|
bool gBoolArray[2] = {true, false};
|
|
|
|
|
|
|
|
int *gIntPtr = &gIntVar;
|
|
|
|
double *gDoublePtr = &gDoubleVar;
|
|
|
|
char *gCharPtr = &gCharVar;
|
|
|
|
bool *gBoolPtr = &gBoolVar;
|
|
|
|
|
|
|
|
int *gIntPtr2 = (int*)0x8;
|
|
|
|
double *gDoublePtr2 = (double*)0x5432;
|
|
|
|
char *gCharPtr2 = (char*)0x4321;
|
|
|
|
bool *gBoolPtr2 = (bool*)0x12ABCDEF;
|
|
|
|
|
|
|
|
class bar {
|
2013-08-12 08:21:06 -04:00
|
|
|
public:
|
|
|
|
bar() {
|
|
|
|
d = 8;
|
|
|
|
e[0] = 18;
|
|
|
|
e[1] = 28;
|
|
|
|
}
|
2008-02-13 20:57:46 +00:00
|
|
|
int d;
|
|
|
|
private:
|
|
|
|
int e[2];
|
|
|
|
};
|
|
|
|
|
|
|
|
class bar2 {
|
2013-08-12 08:21:06 -04:00
|
|
|
public:
|
|
|
|
bar2() {
|
|
|
|
f = 318;
|
|
|
|
g[0] = 228;
|
|
|
|
g[1] = 138;
|
|
|
|
}
|
2008-02-13 20:57:46 +00:00
|
|
|
int f;
|
|
|
|
private:
|
|
|
|
int g[2];
|
|
|
|
};
|
|
|
|
|
|
|
|
class foo: public bar, bar2 {
|
|
|
|
public:
|
2013-08-12 08:21:06 -04:00
|
|
|
foo() {
|
|
|
|
c = 8;
|
|
|
|
a[0] = 1000;
|
|
|
|
a[1] = 23;
|
|
|
|
}
|
2008-02-13 20:57:46 +00:00
|
|
|
int a[2];
|
|
|
|
bar b;
|
|
|
|
private:
|
|
|
|
int c;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Z {
|
|
|
|
public:
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
};
|
|
|
|
struct childStruct {
|
|
|
|
public:
|
|
|
|
Z z;
|
|
|
|
};
|
2010-09-09 12:34:11 +00:00
|
|
|
|
|
|
|
// For bug 320277
|
2010-09-09 20:34:31 +00:00
|
|
|
class Base {
|
|
|
|
public:
|
|
|
|
int nested;
|
|
|
|
int* pNested;
|
|
|
|
};
|
2010-09-09 12:34:11 +00:00
|
|
|
class BaseTest: public Base {
|
|
|
|
public:
|
|
|
|
BaseTest() {}
|
2010-09-09 20:34:31 +00:00
|
|
|
void test() {
|
|
|
|
nested = 8;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
Base Base; // make sure we don't get confused by the same name
|
2010-09-09 12:34:11 +00:00
|
|
|
};
|
|
|
|
// End bug 320277
|
|
|
|
|
2008-02-13 20:57:46 +00:00
|
|
|
void locals2() {
|
|
|
|
// Check that we get the content of local variables with
|
|
|
|
// the same name as the calling method
|
|
|
|
int lIntVar = 6789;
|
|
|
|
double lDoubleArray[2] = {123.456, 6789.6789};
|
|
|
|
char lCharVar = 'i';
|
|
|
|
char *lCharPtr = &lCharVar;
|
|
|
|
bool *lBoolPtr2 = (bool*)0xABCDE123;
|
2010-05-25 23:01:40 +00:00
|
|
|
lBoolPtr2 = 0; // step up to this line to ensure all locals are in scope
|
2008-02-13 20:57:46 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
void testLocals() {
|
|
|
|
|
|
|
|
int lIntVar = 12345;
|
|
|
|
double lDoubleVar = 12345.12345;
|
|
|
|
char lCharVar = 'm';
|
|
|
|
bool lBoolVar = false;
|
|
|
|
|
|
|
|
int lIntArray[2] = {6789, 12345};
|
|
|
|
double lDoubleArray[2] = {456.789, 12345.12345};
|
|
|
|
char lCharArray[2] = {'i', 'm'};
|
|
|
|
bool lBoolArray[2] = {true, false};
|
|
|
|
|
|
|
|
int *lIntPtr = &lIntVar;
|
|
|
|
double *lDoublePtr = &lDoubleVar;
|
|
|
|
char *lCharPtr = &lCharVar;
|
|
|
|
bool *lBoolPtr = &gBoolVar;
|
|
|
|
|
|
|
|
int *lIntPtr2 = (int*)0x1;
|
|
|
|
double *lDoublePtr2 = (double*)0x2345;
|
|
|
|
char *lCharPtr2 = (char*)0x1234;
|
|
|
|
bool *lBoolPtr2 = (bool*)0x123ABCDE;
|
|
|
|
|
|
|
|
locals2();
|
2010-05-25 23:01:40 +00:00
|
|
|
lBoolPtr2 = (bool*)0; // step-out from locals2() will land here; ensures our vars are still visible
|
2008-02-13 20:57:46 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
int testChildren() {
|
|
|
|
foo f;
|
|
|
|
|
|
|
|
f.d = 1;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int testWrite() {
|
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-03-10 19:05:14 -05:00
|
|
|
typedef int *intPtr;
|
|
|
|
|
2008-02-13 20:57:46 +00:00
|
|
|
int a[2] = {3, 456};
|
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-03-10 19:05:14 -05:00
|
|
|
intPtr ptr = 0;
|
2008-02-13 20:57:46 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int testName1(int newVal) {
|
|
|
|
int a = newVal;
|
|
|
|
return a;
|
|
|
|
}
|
|
|
|
|
|
|
|
int testName2(int newVal) {
|
|
|
|
int a = newVal;
|
|
|
|
return a;
|
|
|
|
}
|
|
|
|
|
|
|
|
int testSameName1(int newVal) {
|
|
|
|
int a = newVal;
|
|
|
|
Z z;
|
|
|
|
z.x = newVal;
|
2010-05-25 23:01:40 +00:00
|
|
|
z.x = newVal; // this redundant line is here to ensure 3 steps after running to this func leaves locals visible
|
2008-02-13 20:57:46 +00:00
|
|
|
return a;
|
|
|
|
}
|
|
|
|
int testSameName1(int newVal, int ignore) {
|
|
|
|
int a = newVal;
|
|
|
|
Z z;
|
|
|
|
z.x = newVal;
|
2010-05-25 23:01:40 +00:00
|
|
|
a = newVal; // this redundant line is here to ensure 3 steps after running to this func leaves locals visible
|
2008-02-13 20:57:46 +00:00
|
|
|
return a;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int testSameName() {
|
|
|
|
testSameName1(1);
|
|
|
|
testSameName1(2, 0);
|
|
|
|
testSameName1(3);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int testConcurrent() {
|
|
|
|
int a[2] = {28, 32};
|
|
|
|
return a[0];
|
|
|
|
}
|
|
|
|
|
|
|
|
int testSubblock() {
|
|
|
|
int a = 8;
|
|
|
|
int b = 1;
|
|
|
|
if (a) {
|
|
|
|
int a = 12;
|
|
|
|
b = a;
|
|
|
|
}
|
|
|
|
return b;
|
|
|
|
}
|
|
|
|
|
|
|
|
int testAddress() {
|
|
|
|
int a = 8;
|
|
|
|
int* a_ptr = &a;
|
|
|
|
|
|
|
|
return a;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int testUpdateChildren(int val) {
|
|
|
|
childStruct a;
|
|
|
|
a.z.x = val + 10;
|
|
|
|
a.z.y = val + 11;
|
|
|
|
|
|
|
|
a.z.x = val + 20;
|
|
|
|
a.z.y = val + 21;
|
|
|
|
|
|
|
|
return a.z.x;
|
|
|
|
}
|
|
|
|
int testUpdateChildren2(int val) {
|
|
|
|
childStruct a;
|
|
|
|
a.z.x = val + 10;
|
|
|
|
a.z.y = val + 11;
|
|
|
|
|
|
|
|
a.z.x = val + 20;
|
|
|
|
a.z.y = val + 21;
|
|
|
|
|
|
|
|
return a.z.x;
|
|
|
|
}
|
|
|
|
|
|
|
|
int testDeleteChildren() {
|
|
|
|
foo f;
|
|
|
|
int a[1111];
|
2010-05-25 23:01:40 +00:00
|
|
|
a[0] = 0; // this line is here to ensure a step-over after running to this function leaves our locals visible
|
2008-02-13 20:57:46 +00:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
int testUpdateGDBBug() {
|
|
|
|
// GDB 6.7 has a bug which will cause var-update not to show
|
|
|
|
// the new value of 'a' if we switch the format to binary,
|
|
|
|
// since binary of 3 is 11 which is the same as the old value
|
|
|
|
// in natural format
|
|
|
|
int a = 11;
|
|
|
|
a = 3;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int testUpdateIssue() {
|
|
|
|
double a = 1.99;
|
2010-05-25 23:01:40 +00:00
|
|
|
a = 1.22;
|
|
|
|
a = 1.22; // this redundant line is here to ensure 3 steps after running to this func leaves locals visible
|
2008-02-13 20:57:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int testUpdateIssue2() {
|
|
|
|
struct {
|
|
|
|
double d;
|
|
|
|
} z;
|
|
|
|
|
|
|
|
z.d = 1.0;
|
|
|
|
z.d = 1.22;
|
2010-05-25 23:01:40 +00:00
|
|
|
z.d = 1.22; // this redundant line is here to ensure 3 steps after running to this func leaves locals visible
|
2008-02-13 20:57:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int testConcurrentReadAndUpdateChild() {
|
|
|
|
struct {
|
|
|
|
int d;
|
|
|
|
}z;
|
|
|
|
|
|
|
|
z.d = 1;
|
|
|
|
z.d = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
int testConcurrentUpdateOutOfScopeChildThenParent1() {
|
|
|
|
struct {
|
|
|
|
int d;
|
|
|
|
}z;
|
|
|
|
|
|
|
|
z.d = 1;
|
2010-05-25 23:01:40 +00:00
|
|
|
z.d = 1; // this redundant line is here to ensure 2 steps after running to this func leaves locals visible
|
2008-02-13 20:57:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int testConcurrentUpdateOutOfScopeChildThenParent2() {
|
|
|
|
struct {
|
|
|
|
int d;
|
|
|
|
}z;
|
|
|
|
|
|
|
|
z.d = 2;
|
2010-05-25 23:01:40 +00:00
|
|
|
z.d = 2; // this redundant line is here to ensure 2 steps after running to this func leaves locals visible
|
2008-02-13 20:57:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int testConcurrentUpdateOutOfScopeChildThenParent() {
|
|
|
|
testConcurrentUpdateOutOfScopeChildThenParent1();
|
|
|
|
testConcurrentUpdateOutOfScopeChildThenParent2();
|
|
|
|
}
|
|
|
|
|
|
|
|
int testUpdateOfPointer() {
|
|
|
|
struct {
|
2017-01-27 22:22:36 -05:00
|
|
|
int value;
|
|
|
|
int* ptr;
|
|
|
|
} z;
|
2008-02-13 20:57:46 +00:00
|
|
|
|
2017-01-27 22:22:36 -05:00
|
|
|
int otherValue = 3;
|
2008-02-13 20:57:46 +00:00
|
|
|
|
2017-01-27 22:22:36 -05:00
|
|
|
z.ptr = &z.value;
|
|
|
|
z.value = 1;
|
|
|
|
|
|
|
|
/* testUpdateOfPointer_1 */
|
2008-02-13 20:57:46 +00:00
|
|
|
|
2017-01-27 22:22:36 -05:00
|
|
|
z.ptr = &otherValue;
|
|
|
|
z.value = 2;
|
|
|
|
|
|
|
|
/* testUpdateOfPointer_2 */
|
|
|
|
|
|
|
|
return 0;
|
2008-02-13 20:57:46 +00:00
|
|
|
}
|
|
|
|
|
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-03-10 19:05:14 -05:00
|
|
|
int testUpdateOfPointerTypedef() {
|
|
|
|
typedef int *intPtr;
|
|
|
|
|
|
|
|
int int1 = 1;
|
|
|
|
int int2 = 2;
|
|
|
|
int int3 = 3;
|
|
|
|
int int4 = 4;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
intPtr ptr;
|
|
|
|
} s;
|
|
|
|
|
|
|
|
intPtr ptr = &int1;
|
|
|
|
s.ptr = &int2;
|
|
|
|
|
|
|
|
/* testUpdateOfPointerTypedef_1 */
|
|
|
|
|
|
|
|
ptr = &int3;
|
|
|
|
s.ptr = &int4;
|
|
|
|
|
|
|
|
/* testUpdateOfPointerTypedef_2 */
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-02-13 20:57:46 +00:00
|
|
|
int testCanWrite() {
|
2013-05-31 13:43:09 -04:00
|
|
|
int a = 1;
|
|
|
|
int* b = &a;
|
2008-02-13 20:57:46 +00:00
|
|
|
struct {
|
|
|
|
int in;
|
|
|
|
} c;
|
|
|
|
int d[2];
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2012-01-26 11:59:27 -05:00
|
|
|
int testArrays() {
|
|
|
|
int array_simple[10];
|
|
|
|
int array_int[24321];
|
|
|
|
foo array_foo[1200];
|
2012-01-26 14:22:22 -05:00
|
|
|
int array_double_small[11][21];
|
|
|
|
char array_double_large[111][210];
|
2012-01-26 11:59:27 -05:00
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2012-06-19 12:45:29 -04:00
|
|
|
int testCasting() {
|
|
|
|
int array_large[111] = {65, 0x41424344, 0x45464748}; // Decimal: 65, 1094861636, 1162233672, Char: A, ABCD, EFGH
|
|
|
|
int array_small[4] = {65, 0x41424344, 0x45464748}; // Decimal: 65, 1094861636, 1162233672, Char: A, ABCD, EFGH
|
|
|
|
|
|
|
|
int* int_ptr = &array_small[0];
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2012-05-07 16:08:09 -04:00
|
|
|
// For bug 376901 RTTI tests
|
|
|
|
class VirtualBase {
|
|
|
|
public:
|
|
|
|
virtual ~VirtualBase() {} // Necessary to force RTTI generation for the base class
|
|
|
|
int a;
|
|
|
|
private:
|
|
|
|
bool b;
|
|
|
|
};
|
|
|
|
|
|
|
|
class Derived: public VirtualBase {
|
|
|
|
public:
|
|
|
|
int c;
|
|
|
|
VirtualBase* ptr;
|
|
|
|
private:
|
|
|
|
bool d;
|
|
|
|
int e[4];
|
|
|
|
};
|
|
|
|
|
|
|
|
class OtherDerived: public VirtualBase {
|
|
|
|
public:
|
|
|
|
int d;
|
|
|
|
private:
|
|
|
|
bool c;
|
|
|
|
int f[4];
|
|
|
|
};
|
|
|
|
int testRTTI() {
|
|
|
|
Derived derived;
|
|
|
|
Derived child1;
|
|
|
|
OtherDerived child2;
|
|
|
|
|
|
|
|
derived.ptr = &child1; // here derived.b is of type bar
|
|
|
|
|
|
|
|
derived.ptr = &child2; // here derived.b is of type foo
|
|
|
|
|
|
|
|
return 1; // here derived.b is of type Derived
|
|
|
|
}
|
|
|
|
// End of bug 376901 RTTI tests
|
|
|
|
|
2014-06-02 11:24:25 -04:00
|
|
|
void noReturnValue() {
|
|
|
|
int a = 0;
|
|
|
|
a++;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-08-12 08:21:06 -04:00
|
|
|
int testSimpleReturn(int a) {
|
|
|
|
int b = 0;
|
|
|
|
b = a;
|
|
|
|
return b;
|
|
|
|
}
|
|
|
|
|
|
|
|
foo testComplexReturn() {
|
|
|
|
foo f;
|
|
|
|
int a = 8;
|
|
|
|
|
|
|
|
return f;
|
|
|
|
}
|
|
|
|
|
|
|
|
void testReturn() {
|
|
|
|
int a = 10;
|
|
|
|
bool b = false;
|
|
|
|
|
|
|
|
testSimpleReturn(6);
|
|
|
|
testComplexReturn();
|
2014-06-02 11:24:25 -04:00
|
|
|
noReturnValue();
|
2014-04-15 13:54:47 -04:00
|
|
|
a = 0;
|
2013-08-12 08:21:06 -04:00
|
|
|
}
|
2014-04-15 13:54:47 -04:00
|
|
|
|
|
|
|
void testExistingChild() {
|
|
|
|
bar b;
|
|
|
|
int a = 10;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-02-13 20:57:46 +00:00
|
|
|
int main() {
|
|
|
|
printf("Running ExpressionTest App\n");
|
|
|
|
|
|
|
|
testLocals();
|
|
|
|
testChildren();
|
|
|
|
testWrite();
|
|
|
|
testName1(1);
|
|
|
|
testName2(2);
|
|
|
|
testName1(3);
|
|
|
|
testSameName();
|
|
|
|
testConcurrent();
|
|
|
|
testSubblock();
|
|
|
|
testAddress();
|
|
|
|
testUpdateChildren(0);
|
|
|
|
testUpdateChildren(100);
|
|
|
|
testUpdateChildren2(200);
|
|
|
|
testDeleteChildren();
|
|
|
|
testUpdateGDBBug();
|
|
|
|
testUpdateIssue();
|
|
|
|
testUpdateIssue2();
|
|
|
|
testConcurrentReadAndUpdateChild();
|
|
|
|
testConcurrentUpdateOutOfScopeChildThenParent();
|
|
|
|
testUpdateOfPointer();
|
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-03-10 19:05:14 -05:00
|
|
|
testUpdateOfPointerTypedef();
|
2008-02-13 20:57:46 +00:00
|
|
|
testCanWrite();
|
2012-01-26 11:59:27 -05:00
|
|
|
testArrays();
|
2012-05-07 16:08:09 -04:00
|
|
|
testRTTI();
|
2012-06-19 12:45:29 -04:00
|
|
|
testCasting();
|
2013-08-12 08:21:06 -04:00
|
|
|
testReturn();
|
2014-04-15 13:54:47 -04:00
|
|
|
testExistingChild();
|
2008-02-13 20:57:46 +00:00
|
|
|
|
2010-09-09 12:34:11 +00:00
|
|
|
// For bug 320277
|
|
|
|
BaseTest b; b.test();
|
|
|
|
|
2013-08-12 08:21:06 -04:00
|
|
|
|
2008-02-13 20:57:46 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|