Index: src/common/module_unittest.cc |
diff --git a/src/common/module_unittest.cc b/src/common/module_unittest.cc |
index 0b6432716ee443e637b877e5ffb2cadd32f4690c..78406e37c95d369b4e6b4d1ebeffffb176d74bd5 100644 |
--- a/src/common/module_unittest.cc |
+++ b/src/common/module_unittest.cc |
@@ -64,6 +64,7 @@ static Module::Function *generate_duplicate_function(const string &name) { |
#define MODULE_OS "os-name" |
#define MODULE_ARCH "architecture" |
#define MODULE_ID "id-string" |
+#define MODULE_CODE_ID "code-id-string" |
TEST(Write, Header) { |
stringstream s; |
@@ -74,6 +75,16 @@ TEST(Write, Header) { |
contents.c_str()); |
} |
+TEST(Write, HeaderCodeId) { |
+ stringstream s; |
+ Module m(MODULE_NAME, MODULE_OS, MODULE_ARCH, MODULE_ID, MODULE_CODE_ID); |
+ m.Write(s, ALL_SYMBOL_DATA); |
+ string contents = s.str(); |
+ EXPECT_STREQ("MODULE os-name architecture id-string name with spaces\n" |
+ "INFO CODE_ID code-id-string\n", |
+ contents.c_str()); |
+} |
+ |
TEST(Write, OneLineFunc) { |
stringstream s; |
Module m(MODULE_NAME, MODULE_OS, MODULE_ARCH, MODULE_ID); |