Changeset 207433 in webkit
- Timestamp:
- Oct 17, 2016 2:44:43 PM (8 years ago)
- Location:
- trunk/JSTests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r207432 r207433 1 2016-10-17 Saam Barati <sbarati@apple.com> 2 3 Add more tests for the double->String conversion in ValueAdd constant folding 4 https://bugs.webkit.org/show_bug.cgi?id=163517 5 6 Reviewed by Yusuke Suzuki. 7 8 * microbenchmarks/string-add-constant-folding.js: 9 (test): 10 1 11 2016-10-17 JF Bastien <jfbastien@apple.com> 2 12 -
trunk/JSTests/microbenchmarks/string-add-constant-folding.js
r207060 r207433 66 66 }); 67 67 68 test(function() { 69 let a = "foo"; 70 let b = NaN; 71 assert(a + b === add(a, b)); 72 assert(b + a === add(b, a)); 73 }); 74 75 test(function() { 76 let a = -0; 77 let b = "foo"; 78 assert(a + b === add(a, b)); 79 assert(b + a === add(b, a)); 80 }); 81 82 test(function() { 83 let a = "foo"; 84 let b = 0.0; 85 assert(a + b === add(a, b)); 86 assert(b + a === add(b, a)); 87 }); 88 89 test(function() { 90 let a = "foo"; 91 let b = Infinity; 92 assert(a + b === add(a, b)); 93 assert(b + a === add(b, a)); 94 }); 95 96 test(function() { 97 let a = -Infinity; 98 let b = "foo"; 99 assert(a + b === add(a, b)); 100 assert(b + a === add(b, a)); 101 }); 102 103 test(function() { 104 let a = "foo"; 105 let b = 1e10; 106 assert(a + b === add(a, b)); 107 assert(b + a === add(b, a)); 108 }); 109 110 test(function() { 111 let a = "foo"; 112 let b = 1e-10; 113 assert(a + b === add(a, b)); 114 assert(b + a === add(b, a)); 115 }); 116 117 test(function() { 118 let a = "foo"; 119 let b = 1e5; 120 assert(a + b === add(a, b)); 121 assert(b + a === add(b, a)); 122 }); 123 124 test(function() { 125 let a = "foo"; 126 let b = 1e-5; 127 assert(a + b === add(a, b)); 128 assert(b + a === add(b, a)); 129 }); 130 131 test(function() { 132 let a = "foo"; 133 let b = 1e-40; 134 assert(a + b === add(a, b)); 135 assert(b + a === add(b, a)); 136 }); 137 138 test(function() { 139 let a = "foo"; 140 let b = 1e40; 141 assert(a + b === add(a, b)); 142 assert(b + a === add(b, a)); 143 }); 144 68 145 runTests();
Note: See TracChangeset
for help on using the changeset viewer.