| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // check the real structure of the found value. | 68 // check the real structure of the found value. |
| 69 var assertToStringEquals; | 69 var assertToStringEquals; |
| 70 | 70 |
| 71 // Checks that the found value is true. Use with boolean expressions | 71 // Checks that the found value is true. Use with boolean expressions |
| 72 // for tests that doesn't have their own assertXXX function. | 72 // for tests that doesn't have their own assertXXX function. |
| 73 var assertTrue; | 73 var assertTrue; |
| 74 | 74 |
| 75 // Checks that the found value is false. | 75 // Checks that the found value is false. |
| 76 var assertFalse; | 76 var assertFalse; |
| 77 | 77 |
| 78 // Checks that the found value is null. Kept for historical compatability, | 78 // Checks that the found value is null. Kept for historical compatibility, |
| 79 // please just use assertEquals(null, expected). | 79 // please just use assertEquals(null, expected). |
| 80 var assertNull; | 80 var assertNull; |
| 81 | 81 |
| 82 // Checks that the found value is *not* null. | 82 // Checks that the found value is *not* null. |
| 83 var assertNotNull; | 83 var assertNotNull; |
| 84 | 84 |
| 85 // Assert that the passed function or eval code throws an exception. | 85 // Assert that the passed function or eval code throws an exception. |
| 86 // The optional second argument is an exception constructor that the | 86 // The optional second argument is an exception constructor that the |
| 87 // thrown exception is checked against with "instanceof". | 87 // thrown exception is checked against with "instanceof". |
| 88 // The optional third argument is a message type string that is compared | 88 // The optional third argument is a message type string that is compared |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 // Fix this when we ditch the old test runner. | 348 // Fix this when we ditch the old test runner. |
| 349 var message = "Fail" + "ure: unreachable"; | 349 var message = "Fail" + "ure: unreachable"; |
| 350 if (name_opt) { | 350 if (name_opt) { |
| 351 message += " - " + name_opt; | 351 message += " - " + name_opt; |
| 352 } | 352 } |
| 353 throw new MjsUnitAssertionError(message); | 353 throw new MjsUnitAssertionError(message); |
| 354 }; | 354 }; |
| 355 | 355 |
| 356 })(); | 356 })(); |
| 357 | 357 |
| OLD | NEW |