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

Side by Side Diff: runtime/vm/longjump_test.cc

Issue 108383007: Replaces LongJump with LongJumpScope. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/isolate.h" 5 #include "vm/isolate.h"
6 #include "vm/longjump.h" 6 #include "vm/longjump.h"
7 #include "vm/unit_test.h" 7 #include "vm/unit_test.h"
8 8
9 namespace dart { 9 namespace dart {
10 10
11 static void LongJumpHelper(LongJump* jump) { 11 static void LongJumpHelper(LongJumpScope* jump) {
12 const Error& error = 12 const Error& error =
13 Error::Handle(LanguageError::New( 13 Error::Handle(LanguageError::New(
14 String::Handle(String::New("LongJumpHelper")))); 14 String::Handle(String::New("LongJumpHelper"))));
15 jump->Jump(1, error); 15 jump->Jump(1, error);
16 UNREACHABLE(); 16 UNREACHABLE();
17 } 17 }
18 18
19 19
20 TEST_CASE(LongJump) { 20 TEST_CASE(LongJump) {
21 LongJump jump; 21 LongJumpScope jump;
22 if (setjmp(*jump.Set()) == 0) { 22 if (setjmp(*jump.Set()) == 0) {
23 LongJumpHelper(&jump); 23 LongJumpHelper(&jump);
24 UNREACHABLE(); 24 UNREACHABLE();
25 } 25 }
26 } 26 }
27 27
28 } // namespace dart 28 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698