Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc

Issue 2191443003: Add a prepare to parse step to CompilerDispatcherJob (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler-dispatcher/compiler-dispatcher-job.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <memory> 5 #include <memory>
6 6
7 #include "src/compiler-dispatcher/compiler-dispatcher-job.h" 7 #include "src/compiler-dispatcher/compiler-dispatcher-job.h"
8 #include "src/isolate-inl.h" 8 #include "src/isolate-inl.h"
9 #include "test/unittests/test-utils.h" 9 #include "test/unittests/test-utils.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace v8 { 12 namespace v8 {
13 namespace internal { 13 namespace internal {
14 14
15 typedef TestWithContext CompilerDispatcherJobTest; 15 typedef TestWithContext CompilerDispatcherJobTest;
16 16
17 TEST_F(CompilerDispatcherJobTest, Construct) { 17 TEST_F(CompilerDispatcherJobTest, Construct) {
18 Isolate* i_isolate = reinterpret_cast<Isolate*>(isolate()); 18 Isolate* i_isolate = reinterpret_cast<Isolate*>(isolate());
19 std::unique_ptr<CompilerDispatcherJob> job( 19 std::unique_ptr<CompilerDispatcherJob> job(
20 new CompilerDispatcherJob(i_isolate, i_isolate->object_function())); 20 new CompilerDispatcherJob(i_isolate, i_isolate->object_function()));
21 } 21 }
22 22
23 TEST_F(CompilerDispatcherJobTest, PrepareToParse) {
24 Isolate* i_isolate = reinterpret_cast<Isolate*>(isolate());
25 std::unique_ptr<CompilerDispatcherJob> job(
26 new CompilerDispatcherJob(i_isolate, i_isolate->object_function()));
27
28 ASSERT_TRUE(job->status() == CompileJobStatus::kInitial);
29 job->PrepareToParseOnMainThread();
30 ASSERT_TRUE(job->status() == CompileJobStatus::kReadyToParse);
31 }
32
23 } // namespace internal 33 } // namespace internal
24 } // namespace v8 34 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler-dispatcher/compiler-dispatcher-job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698