<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>12961</bug_id>
          
          <creation_ts>2007-03-04 00:33:36 -0800</creation_ts>
          <short_desc>shouldBe() should support NaN</short_desc>
          <delta_ts>2007-03-04 22:31:54 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>12953</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Proskuryakov">ap</reporter>
          <assigned_to name="Alexey Proskuryakov">ap</assigned_to>
          <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>20496</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-03-04 00:33:36 -0800</bug_when>
    <thetext>Currently, JS shouldBe() tests don&apos;t work with NaN results, because NaN != NaN. Patch forthcoming.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20497</commentid>
    <comment_count>1</comment_count>
      <attachid>13468</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-03-04 00:35:51 -0800</bug_when>
    <thetext>Created attachment 13468
proposed patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20508</commentid>
    <comment_count>2</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2007-03-04 03:53:54 -0800</bug_when>
    <thetext>Looks fine, though what is the &quot;===&quot; operator? (you didn&apos;t add it - just wondering though...)

-  else if (_av === _bv)
+  else if (_av === _bv || (typeof(_av) == &quot;number&quot; &amp;&amp; typeof(_bv) == &quot;number&quot; &amp;&amp; isNaN(_av) &amp;&amp; isNaN(_bv)))

Niko

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20518</commentid>
    <comment_count>3</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-03-04 07:05:44 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; Looks fine, though what is the &quot;===&quot; operator? (you didn&apos;t add it - just
&gt; wondering though...)

It&apos;s the identity (strict equality) operator.  There is also a &quot;not identity&quot; operator: !==

http://www.webreference.com/js/tips/991205.html

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20550</commentid>
    <comment_count>4</comment_count>
      <attachid>13468</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2007-03-04 21:56:00 -0800</bug_when>
    <thetext>Comment on attachment 13468
proposed patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20555</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-03-04 22:31:54 -0800</bug_when>
    <thetext>Committed revision 19959.
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>13468</attachid>
            <date>2007-03-04 00:35:51 -0800</date>
            <delta_ts>2007-03-04 21:56:00 -0800</delta_ts>
            <desc>proposed patch</desc>
            <filename>12961r1_patch.txt</filename>
            <type>text/plain</type>
            <size>1212</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">SW5kZXg6IExheW91dFRlc3RzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09P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GlvbikKICAgICB0ZXN0RmFpbGVkKF9hICsgIiBzaG91
bGQgYmUgIiArIF9idiArICIuIFRocmV3IGV4Y2VwdGlvbiAiICsgZXhjZXB0aW9uKTsKLSAgZWxz
ZSBpZiAoX2F2ID09PSBfYnYpCisgIGVsc2UgaWYgKF9hdiA9PT0gX2J2IHx8ICh0eXBlb2YoX2F2
KSA9PSAibnVtYmVyIiAmJiB0eXBlb2YoX2J2KSA9PSAibnVtYmVyIiAmJiBpc05hTihfYXYpICYm
IGlzTmFOKF9idikpKQogICAgIHRlc3RQYXNzZWQoX2EgKyAiIGlzICIgKyBfYik7CiAgIGVsc2Ug
ewogICAgIHRlc3RGYWlsZWQoX2EgKyAiIHNob3VsZCBiZSAiICsgX2J2ICsgIiAob2YgdHlwZSAi
ICsgdHlwZW9mIF9idiAK
</data>
<flag name="review"
          id="5315"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>