projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b6e24a
)
fix NaN == NaN comparison in Asserts.js
author
Dan Vanderkam
<dan@dygraphs.com>
Mon, 13 Jun 2011 03:13:53 +0000
(23:13 -0400)
committer
Dan Vanderkam
<dan@dygraphs.com>
Mon, 13 Jun 2011 03:13:53 +0000
(23:13 -0400)
auto_tests/lib/Asserts.js
patch
|
blob
|
blame
|
history
diff --git
a/auto_tests/lib/Asserts.js
b/auto_tests/lib/Asserts.js
index
b3ed441
..
b06ff29
100644
(file)
--- a/
auto_tests/lib/Asserts.js
+++ b/
auto_tests/lib/Asserts.js
@@
-178,6
+178,11
@@
function compare_(expected, actual) {
return false;
}
+ if (isNaN(expected) && isNaN(actual)) {
+ // This has to be special-cased because (NaN === NaN) == false.
+ return true;
+ }
+
var key = null;
var actualLength = 0;
var expectedLength = 0;