<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [iOS Simulator] js/intl-collator.html failing"
   href="https://bugs.webkit.org/show_bug.cgi?id=152448#c11">Comment # 11</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [iOS Simulator] js/intl-collator.html failing"
   href="https://bugs.webkit.org/show_bug.cgi?id=152448">bug 152448</a>
              from <span class="vcard"><a class="email" href="mailto:sukolsak&#64;gmail.com" title="Sukolsak Sakshuwong &lt;sukolsak&#64;gmail.com&gt;"> <span class="fn">Sukolsak Sakshuwong</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=152448#c10">comment #10</a>)
<span class="quote">&gt; &gt; &quot;new Intl.Collator()&quot; returns a collator with the default locale. We cannot predict the value of &quot;new Intl.Collator().compare('a', 'A')&quot;.
&gt; 
&gt; We need to test that &quot;new Intl.Collator()&quot; works, can't just remove the test
&gt; for this functionality.</span >

We have tests for &quot;new Intl.Collator()&quot;, including &quot;shouldBe(&quot;new Intl.Collator().compare.call(null, 'a', 'b')&quot;, &quot;-1&quot;)&quot;. We can test that because any sensible language will likely have 'a' before 'b'. It can still be wrong, but it's extremely unlikely.

Testing compare('a', 'A') with an unknown locale is harder to predict. If we do really want to test it, we could do

shouldBeTrue(&quot;var collator = new Intl.Collator(); collator.resolvedOptions().locale != 'en-US' || collator.compare.call(Intl.Collator('en', { sensitivity:'base' }), 'A', 'a') == 1&quot;);

But that's not the point of this test case, if you look at the comment above it. The point of this test case is to test that calling compare() with any &quot;this&quot; has no effect on it.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>