| OLD | NEW | 
|---|
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 97         return false; | 97         return false; | 
| 98       } | 98       } | 
| 99     } | 99     } | 
| 100     return true; | 100     return true; | 
| 101   } else { | 101   } else { | 
| 102     return deepObjectEquals(a, b); | 102     return deepObjectEquals(a, b); | 
| 103   } | 103   } | 
| 104 } | 104 } | 
| 105 | 105 | 
| 106 | 106 | 
|  | 107 function assertSame(expected, found, name_opt) { | 
|  | 108   if (found !== expected) { | 
|  | 109     fail(expected, found, name_opt); | 
|  | 110   } | 
|  | 111 } | 
|  | 112 | 
|  | 113 | 
| 107 function assertEquals(expected, found, name_opt) { | 114 function assertEquals(expected, found, name_opt) { | 
| 108   if (!deepEquals(found, expected)) { | 115   if (!deepEquals(found, expected)) { | 
| 109     fail(expected, found, name_opt); | 116     fail(expected, found, name_opt); | 
| 110   } | 117   } | 
| 111 } | 118 } | 
| 112 | 119 | 
| 113 | 120 | 
| 114 function assertArrayEquals(expected, found, name_opt) { | 121 function assertArrayEquals(expected, found, name_opt) { | 
| 115   var start = ""; | 122   var start = ""; | 
| 116   if (name_opt) { | 123   if (name_opt) { | 
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 197 | 204 | 
| 198 | 205 | 
| 199 function assertUnreachable(name_opt) { | 206 function assertUnreachable(name_opt) { | 
| 200   // Fix this when we ditch the old test runner. | 207   // Fix this when we ditch the old test runner. | 
| 201   var message = "Fail" + "ure: unreachable" | 208   var message = "Fail" + "ure: unreachable" | 
| 202   if (name_opt) { | 209   if (name_opt) { | 
| 203     message += " - " + name_opt; | 210     message += " - " + name_opt; | 
| 204   } | 211   } | 
| 205   throw new MjsUnitAssertionError(message); | 212   throw new MjsUnitAssertionError(message); | 
| 206 } | 213 } | 
| OLD | NEW | 
|---|