Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/22048#discussion_r213880735
--- Diff: core/src/test/scala/org/apache/spark/util/UtilsSuite.scala ---
@@ -1184,6 +1184,25 @@ class UtilsSuite extends SparkFunSuite with
ResetSystemProperties with Logging {
assert(Utils.getSimpleName(classOf[MalformedClassObject.MalformedClass]) ===
"UtilsSuite$MalformedClassObject$MalformedClass")
}
+
+ test("stringHalfWidth") {
+ assert(Utils.stringHalfWidth(null) == 0)
+ assert(Utils.stringHalfWidth("") == 0)
+ assert(Utils.stringHalfWidth("ab c") == 4)
+ assert(Utils.stringHalfWidth("1098") == 4)
+ assert(Utils.stringHalfWidth("mø") == 2)
+ assert(Utils.stringHalfWidth("γÏÏ") == 3)
--- End diff --
Don't change it. There are Unicode characters elsewhere in the source, and
it's clearer this way.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]