53ba5c402e
I do this in preparation for using the sticky error to implement isolate unwinding. Review URL: https://chromiumcodereview.appspot.com//9186058 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3367 260f80e4-7a28-3924-810f-c04153c831b5
29 lines
670 B
C++
29 lines
670 B
C++
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#include "vm/isolate.h"
|
|
#include "vm/longjump.h"
|
|
#include "vm/unit_test.h"
|
|
|
|
namespace dart {
|
|
|
|
static void LongJumpHelper(LongJump* jump) {
|
|
const Error& error =
|
|
Error::Handle(LanguageError::New(
|
|
String::Handle(String::New("LongJumpHelper"))));
|
|
jump->Jump(1, error);
|
|
UNREACHABLE();
|
|
}
|
|
|
|
|
|
TEST_CASE(LongJump) {
|
|
LongJump jump;
|
|
if (setjmp(*jump.Set()) == 0) {
|
|
LongJumpHelper(&jump);
|
|
UNREACHABLE();
|
|
}
|
|
}
|
|
|
|
} // namespace dart
|