OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 /** |
| 6 * Class for testing the unit_test framework. |
| 7 * @constructor |
| 8 * @extends {testing.Test} |
| 9 */ |
| 10 function FrameworkUnitTest() {} |
| 11 |
| 12 FrameworkUnitTest.prototype = { |
| 13 __proto__: testing.Test.prototype, |
| 14 }; |
| 15 |
| 16 TEST_F('FrameworkUnitTest', 'ExpectTrueOk', function() { |
| 17 expectTrue(true); |
| 18 }); |
| 19 |
| 20 TEST_F('FrameworkUnitTest', 'AssertTrueOk', function() { |
| 21 assertTrue(true); |
| 22 }); |
| 23 |
| 24 /** |
| 25 * Failing version of FrameworkUnitTest. |
| 26 * @constructor |
| 27 * @extends {FrameworkUnitTest} |
| 28 */ |
| 29 function FrameworkUnitTestFail() {} |
| 30 |
| 31 FrameworkUnitTestFail.prototype = { |
| 32 __proto__: FrameworkUnitTest.prototype, |
| 33 |
| 34 /** inheritDoc */ |
| 35 testShouldFail: true, |
| 36 }; |
| 37 |
| 38 TEST_F('FrameworkUnitTestFail', 'ExpectFailFails', function() { |
| 39 expectNotReached(); |
| 40 }); |
| 41 |
| 42 TEST_F('FrameworkUnitTestFail', 'AssertFailFails', function() { |
| 43 assertNotReached(); |
| 44 }); |
OLD | NEW |