aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2019-07-23 08:07:24 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2019-07-23 19:10:35 +0100
commiteb6efdb60b1da8ec3341280ac79bb76373ad8bfc (patch)
tree5a32742f51e0b967df43c7fc03a1047852c367e7
parent03f77453643e936575b4ed2e3b3539749d2c03b5 (diff)
downloadswig-eb6efdb60b1da8ec3341280ac79bb76373ad8bfc.tar.gz
C# wstring testing
Test code from issue #1530
-rw-r--r--Examples/test-suite/csharp/li_std_wstring_runme.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/Examples/test-suite/csharp/li_std_wstring_runme.cs b/Examples/test-suite/csharp/li_std_wstring_runme.cs
index 501ab8496..a9bcf9b1e 100644
--- a/Examples/test-suite/csharp/li_std_wstring_runme.cs
+++ b/Examples/test-suite/csharp/li_std_wstring_runme.cs
@@ -71,6 +71,20 @@ public class runme
check_equal(li_std_wstring.test_wchar_overload(x), "abc");
*/
+ {
+ // Unicode strings
+ string[] test_strings = {
+ "JP: 日本語", "DE: Kröpeliner Straße" , "RU: Война и мир", "EN: War and Peace"
+ };
+
+ foreach (string expected in test_strings)
+ {
+ string result = li_std_wstring.test_value(expected);
+
+ if (result != expected)
+ throw new Exception("test_string failure '" + result + "' != '" + expected + "'");
+ }
+ }
}
}