Chromium Code Reviews| Index: chrome/test/data/unit/framework_unittest.gtestjs |
| diff --git a/chrome/test/data/unit/framework_unittest.gtestjs b/chrome/test/data/unit/framework_unittest.gtestjs |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3eee034ba22262a79f7cd6e68e4d1eebc0e09b3c |
| --- /dev/null |
| +++ b/chrome/test/data/unit/framework_unittest.gtestjs |
| @@ -0,0 +1,42 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +/** |
| + * Class for testing the unit_test framework. |
| + * @constructor |
| + */ |
| +function FrameworkUnitTest() {} |
| + |
| +FrameworkUnitTest.prototype = { |
| + __proto__: testing.Test.prototype, |
| +}; |
| + |
| +TEST_F('FrameworkUnitTest', 'testExpectTrueOk', function() { |
| + expectTrue(true); |
| +}); |
| + |
| +TEST_F('FrameworkUnitTest', 'testAssertTrueOk', function() { |
| + assertTrue(true); |
| +}); |
| + |
| +/** |
| + * Failing version of FrameworkUnitTest. |
| + * @constructor |
| + */ |
| +function FrameworkUnitTestFail() {} |
|
dpapad
2011/11/03 16:14:34
I think that this could be compressed a bit as fol
arv (Not doing code reviews)
2011/11/03 19:04:12
That is bad practice. The following would fail the
Sheridan Rawlins
2011/11/05 16:51:25
Ok, so this is a nop. <not> Done. :)
On 2011/11
|
| + |
| +FrameworkUnitTestFail.prototype = { |
| + __proto__: FrameworkUnitTest.prototype, |
| + |
| + /** inheritDoc */ |
| + testShouldFail: true, |
| +}; |
| + |
| +TEST_F('FrameworkUnitTestFail', 'testExpectFailFails', function() { |
| + expectNotReached(); |
| +}); |
| + |
| +TEST_F('FrameworkUnitTestFail', 'testAssertFailFails', function() { |
| + assertNotReached(); |
| +}); |