aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-10-19 23:38:40 +0000
committerIan Lance Taylor <iant@google.com>2007-10-19 23:38:40 +0000
commit28ef317915adce586bbe0080b0950de1a55dea14 (patch)
tree49dc6754fb2daae2b8c5ad83a8763377f1d5f159 /gold
parentfa1bd4fb25c5fb738010e77f1244161727b5f7bd (diff)
downloadgdb-28ef317915adce586bbe0080b0950de1a55dea14.zip
gdb-28ef317915adce586bbe0080b0950de1a55dea14.tar.gz
gdb-28ef317915adce586bbe0080b0950de1a55dea14.tar.bz2
Add wide string constant test.
Diffstat (limited to 'gold')
-rw-r--r--gold/testsuite/two_file_test.h3
-rw-r--r--gold/testsuite/two_file_test_1.cc13
-rw-r--r--gold/testsuite/two_file_test_2.cc8
3 files changed, 24 insertions, 0 deletions
diff --git a/gold/testsuite/two_file_test.h b/gold/testsuite/two_file_test.h
index 60a7edd..63c529e 100644
--- a/gold/testsuite/two_file_test.h
+++ b/gold/testsuite/two_file_test.h
@@ -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();
diff --git a/gold/testsuite/two_file_test_1.cc b/gold/testsuite/two_file_test_1.cc
index d22d957..382e048 100644
--- a/gold/testsuite/two_file_test_1.cc
+++ b/gold/testsuite/two_file_test_1.cc
@@ -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';
+}
diff --git a/gold/testsuite/two_file_test_2.cc b/gold/testsuite/two_file_test_2.cc
index 6454e99..806409e 100644
--- a/gold/testsuite/two_file_test_2.cc
+++ b/gold/testsuite/two_file_test_2.cc
@@ -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;
+}