| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 x = ""; | 154 x = ""; |
| 155 assertFalse(b > b, "Compare objects b > b"); | 155 assertFalse(b > b, "Compare objects b > b"); |
| 156 assertEquals("fiskfisk", x, "Compare objects b > b valueOf order"); | 156 assertEquals("fiskfisk", x, "Compare objects b > b valueOf order"); |
| 157 | 157 |
| 158 x = ""; | 158 x = ""; |
| 159 assertTrue(b >= b, "Compare objects b >= b"); | 159 assertTrue(b >= b, "Compare objects b >= b"); |
| 160 assertEquals("fiskfisk", x, "Compare objects b >= b valueOf order"); | 160 assertEquals("fiskfisk", x, "Compare objects b >= b valueOf order"); |
| 161 | 161 |
| 162 x = ""; | 162 x = ""; |
| 163 assertFalse(a > b, "Compare objects a > b"); | 163 assertFalse(a > b, "Compare objects a > b"); |
| 164 assertEquals("fiskhest", x, "Compare objects a > b valueOf order"); | 164 assertEquals("hestfisk", x, "Compare objects a > b valueOf order"); |
| 165 | 165 |
| 166 x = ""; | 166 x = ""; |
| 167 assertFalse(a > void(0), "Compare objects a > undefined"); | 167 assertFalse(a > void(0), "Compare objects a > undefined"); |
| 168 assertEquals("hest", x, "Compare objects a > undefined valueOf order"); | 168 assertEquals("hest", x, "Compare objects a > undefined valueOf order"); |
| 169 | 169 |
| 170 x = ""; | 170 x = ""; |
| 171 assertFalse(void(0) > b, "Compare objects undefined > b"); | 171 assertFalse(void(0) > b, "Compare objects undefined > b"); |
| 172 assertEquals("fisk", x, "Compare objects undefined > b valueOf order"); | 172 assertEquals("fisk", x, "Compare objects undefined > b valueOf order"); |
| 173 | 173 |
| 174 | 174 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 188 x = ""; | 188 x = ""; |
| 189 assertFalse(b > b, "Compare objects b > b"); | 189 assertFalse(b > b, "Compare objects b > b"); |
| 190 assertEquals("fiskfisk", x, "Compare objects b > b valueOf order"); | 190 assertEquals("fiskfisk", x, "Compare objects b > b valueOf order"); |
| 191 | 191 |
| 192 x = ""; | 192 x = ""; |
| 193 assertTrue(b >= b, "Compare objects b >= b"); | 193 assertTrue(b >= b, "Compare objects b >= b"); |
| 194 assertEquals("fiskfisk", x, "Compare objects b >= b valueOf order"); | 194 assertEquals("fiskfisk", x, "Compare objects b >= b valueOf order"); |
| 195 | 195 |
| 196 x = ""; | 196 x = ""; |
| 197 assertFalse(a > b, "Compare objects a > b"); | 197 assertFalse(a > b, "Compare objects a > b"); |
| 198 assertEquals("fiskhest", x, "Compare objects a > b valueOf order"); | 198 assertEquals("hestfisk", x, "Compare objects a > b valueOf order"); |
| 199 | 199 |
| 200 x = ""; | 200 x = ""; |
| 201 assertFalse(a > void(0), "Compare objects a > undefined"); | 201 assertFalse(a > void(0), "Compare objects a > undefined"); |
| 202 assertEquals("hest", x, "Compare objects a > undefined valueOf order"); | 202 assertEquals("hest", x, "Compare objects a > undefined valueOf order"); |
| 203 | 203 |
| 204 x = ""; | 204 x = ""; |
| 205 assertFalse(void(0) > b, "Compare objects undefined > b"); | 205 assertFalse(void(0) > b, "Compare objects undefined > b"); |
| 206 assertEquals("fisk", x, "Compare objects undefined > b valueOf order"); | 206 assertEquals("fisk", x, "Compare objects undefined > b valueOf order"); |
| 207 } | 207 } |
| 208 | 208 |
| 209 // Call inside loop to test optimization and possible caching. | 209 // Call inside loop to test optimization and possible caching. |
| 210 for (i = 0; i < 3; ++i) { | 210 for (i = 0; i < 3; ++i) { |
| 211 identical_object_comparison(); | 211 identical_object_comparison(); |
| 212 } | 212 } |
| 213 | 213 |
| 214 | 214 |
| 215 print("ok"); | 215 print("ok"); |
| OLD | NEW |