def test_pack(self):
    src = '\n        #include <stdio.h>\n        #include <string.h>\n\n        #pragma pack(push,1)\n        typedef struct header\n        {\n            unsigned char  id;\n            unsigned short colour;\n            unsigned char  desc;\n        } header;\n        #pragma pack(pop)\n\n        typedef struct fatheader\n        {\n            unsigned char  id;\n            unsigned short colour;\n            unsigned char  desc;\n        } fatheader;\n\n        int main( int argc, const char *argv[] ) {\n          header h, *ph = 0;\n          fatheader fh, *pfh = 0;\n          printf("*%d,%d,%d*\\n", sizeof(header), (int)((int)&h.desc - (int)&h.id), (int)(&ph[1])-(int)(&ph[0]));\n          printf("*%d,%d,%d*\\n", sizeof(fatheader), (int)((int)&fh.desc - (int)&fh.id), (int)(&pfh[1])-(int)(&pfh[0]));\n          return 0;\n        }\n        '
    self.do_run(src, '*4,3,4*\n*6,4,6*')
def test_pack(self):
    src = '\n        #include <stdio.h>\n        #include <string.h>\n\n        #pragma pack(push,1)\n        typedef struct header\n        {\n            unsigned char  id;\n            unsigned short colour;\n            unsigned char  desc;\n        } header;\n        #pragma pack(pop)\n\n        typedef struct fatheader\n        {\n            unsigned char  id;\n            unsigned short colour;\n            unsigned char  desc;\n        } fatheader;\n\n        int main( int argc, const char *argv[] ) {\n          header h, *ph = 0;\n          fatheader fh, *pfh = 0;\n          printf("*%d,%d,%d*\\n", sizeof(header), (int)((int)&h.desc - (int)&h.id), (int)(&ph[1])-(int)(&ph[0]));\n          printf("*%d,%d,%d*\\n", sizeof(fatheader), (int)((int)&fh.desc - (int)&fh.id), (int)(&pfh[1])-(int)(&pfh[0]));\n          return 0;\n        }\n        '
    self.do_run(src, '*4,3,4*\n*6,4,6*')