Home | History | Annotate | Download | only in P_struct_field
      1 // -Wall -Werror
      2 #pragma version(1)
      3 #pragma rs java_package_name(struct_field)
      4 
      5 // Ensure that we can compile a script containing an exported struct
      6 // with multiple fields of type struct, and reflect correct Java code
      7 // for it.
      8 
      9 struct InnerOne {
     10     int x;
     11     int y;
     12     float f;
     13 };
     14 
     15 typedef struct InnerOne s_innerOne;
     16 
     17 struct InnerTwo {
     18     int8_t z;
     19     struct InnerOne innerOne;
     20 };
     21 
     22 struct Outer {
     23     struct InnerOne innerOneA;
     24     long l;  // to induce padding
     25     struct InnerOne innerOneB;
     26     struct InnerTwo innerTwo3[3];
     27     struct InnerTwo innerTwo2[2];
     28     struct InnerOne innerOne4[4];
     29     s_innerOne      innerOneC;  // does a typedef confuse reflection?
     30 };
     31 
     32 struct Outer outer;
     33