| OLD | NEW |
| 1 // We override only the things we need to -- the rest we'll just inherit from | 1 // We override only the things we need to -- the rest we'll just inherit from |
| 2 // original-harness.js. Polymorphism, kind of. | 2 // original-harness.js. Polymorphism, kind of. |
| 3 ReflectionHarness.catchUnexpectedExceptions = false; | 3 ReflectionHarness.catchUnexpectedExceptions = false; |
| 4 | 4 |
| 5 ReflectionHarness.test = function(expected, actual, description) { | 5 ReflectionHarness.test = function(expected, actual, description) { |
| 6 test(function() { | 6 test(function() { |
| 7 assert_equals(expected, actual); | 7 assert_equals(expected, actual); |
| 8 }, this.getTypeDescription() + ": " + description); | 8 }, this.getTypeDescription() + ": " + description); |
| 9 // This is the test suite that will rate conformance, so we don't want to | 9 // This is the test suite that will rate conformance, so we don't want to |
| 10 // bail out early if a test fails -- we want all tests to always run. | 10 // bail out early if a test fails -- we want all tests to always run. |
| 11 return true; | 11 return true; |
| 12 } | 12 } |
| 13 | 13 |
| 14 ReflectionHarness.run = function(fun, description) { | 14 ReflectionHarness.run = function(fun, description) { |
| 15 test(fun, this.getTypeDescription() + ": " + description); | 15 test(fun, this.getTypeDescription() + ": " + description); |
| 16 } | 16 } |
| 17 | 17 |
| 18 ReflectionHarness.testException = function(exceptionName, fn, description) { | 18 ReflectionHarness.testException = function(exceptionName, fn, description) { |
| 19 test(function() { | 19 test(function() { |
| 20 assert_throws(exceptionName, fn); | 20 assert_throws(exceptionName, fn); |
| 21 }, this.getTypeDescription() + ": " + description); | 21 }, this.getTypeDescription() + ": " + description); |
| 22 } | 22 } |
| OLD | NEW |