Chromium Code Reviews| Index: test/cctest/test-code-stubs.cc |
| diff --git a/test/cctest/test-code-stubs.cc b/test/cctest/test-code-stubs.cc |
| index 0784aac78e9c815716591f17717cddcefe08c98b..03af8897045a265b4192aedc8e792f3fbf2202d0 100644 |
| --- a/test/cctest/test-code-stubs.cc |
| +++ b/test/cctest/test-code-stubs.cc |
| @@ -172,3 +172,19 @@ void RunAllTruncationTests(ConvertDToICallWrapper callWrapper, |
| #undef NaN |
| #undef Infinity |
| #undef RunOneTruncationTest |
| + |
| + |
| +TEST(CodeStubMajorKeys) { |
| + CcTest::InitializeVM(); |
|
mvstanton
2014/09/04 14:23:59
Yay! nice test :).
|
| + LocalContext context; |
| + Isolate* isolate = CcTest::i_isolate(); |
| + |
| +#define CHECK_STUB(NAME) \ |
| + { \ |
| + HandleScope scope(isolate); \ |
| + NAME##Stub stub_impl(0xabcd, isolate); \ |
| + CodeStub* stub = &stub_impl; \ |
| + CHECK_EQ(stub->MajorKey(), CodeStub::NAME); \ |
| + } |
| + CODE_STUB_LIST(CHECK_STUB); |
| +} |