Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22048#discussion_r213699899
  
    --- 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 --
    
    I think it is OK to type Unicode chars into source files because git and 
Scala ought to be set up to encode and read the source as UTF8. I have avoided 
it in the past and used Unicode escapes (but put actual string in comment) to 
be safe. I don't feel strongly. I think we have other instances of Unicode in 
the source. Just a comment. 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to