Add wide string constant test.
authorIan Lance Taylor <iant@google.com>
Fri, 19 Oct 2007 23:38:40 +0000 (23:38 +0000)
committerIan Lance Taylor <iant@google.com>
Fri, 19 Oct 2007 23:38:40 +0000 (23:38 +0000)
gold/testsuite/two_file_test.h
gold/testsuite/two_file_test_1.cc
gold/testsuite/two_file_test_2.cc

index 60a7eddfdf5387c6fe035ffcc08a122b38d05122..63c529e3762a9c134f004af45f566eb34ca30bab 100644 (file)
@@ -62,3 +62,6 @@ extern void (*f13())();
 
 #define TEST_STRING_CONSTANT "test string constant"
 extern const char* f14();
+
+#define TEST_WIDE_STRING_CONSTANT L"test wide string constant"
+extern const wchar_t* f15();
index d22d95757377c606a2d0da42597e1a01a24fcae2..382e04892ea7e562c11580b2281ee42bf0c0451f 100644 (file)
@@ -180,3 +180,16 @@ t14()
       return false;
   return *s2 == '\0';
 }
+
+// 15 Compare wide string constants in file 1 and file 2.
+
+bool
+t15()
+{
+  const wchar_t* s1 = TEST_WIDE_STRING_CONSTANT;
+  const wchar_t* s2 = f15();
+  while (*s1 != '\0')
+    if (*s1++ != *s2++)
+      return false;
+  return *s2 == '\0';
+}
index 6454e9983cda212092302c37985f95b3cda80b7b..806409e771f4f9be655659392ba16821a5217690 100644 (file)
@@ -100,3 +100,11 @@ f14()
 {
   return TEST_STRING_CONSTANT;
 }
+
+// 15 Compare wide string constants in file 1 and file 2.
+
+const wchar_t*
+f15()
+{
+  return TEST_WIDE_STRING_CONSTANT;
+}
This page took 0.0252559999999999 seconds and 4 git commands to generate.