Add some tests for expand/collapse variables; todo - fails on gdb/linux

This commit is contained in:
Ben Jackson 2020-07-12 16:45:43 +01:00
commit 97f6dd29a6
8 changed files with 389 additions and 5 deletions

33
tests/testdata/cpp/simple/struct.cpp vendored Normal file
View file

@ -0,0 +1,33 @@
struct AnotherTest
{
char choo;
int ints[5];
};
struct Test
{
int i;
char c;
float fffff;
AnotherTest another_test;
};
static Test SetUp( Test t )
{
t.another_test.choo = 'p';
t.another_test.ints[ 0 ] = t.i; return t;
}
int main( int , char ** )
{
Test t = {};
t.i = 1;
t.c = 'c';
t.fffff = 3.14;
t = SetUp( t );
return t.another_test.ints[ 0 ];
}