def test():
    self.dylink_test(header='\n        #include <stdio.h>\n        struct Class {\n          Class(const char *name) { printf("new %s\\n", name); }\n        };\n      ', main='\n        #include "header.h"\n        static Class c("main");\n        int main() {\n          return 0;\n        }\n      ', side='\n        #include "header.h"\n        static Class c("side");\n      ', expected=['new main\nnew side\n', 'new side\nnew main\n'])
def test():
    self.dylink_test(header='\n        #include <stdio.h>\n        struct Class {\n          Class(const char *name) { printf("new %s\\n", name); }\n        };\n      ', main='\n        #include "header.h"\n        static Class c("main");\n        int main() {\n          return 0;\n        }\n      ', side='\n        #include "header.h"\n        static Class c("side");\n      ', expected=['new main\nnew side\n', 'new side\nnew main\n'])