mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 21:11:19 +00:00
7b44fa4265
Close #40140. Change-Id: I897a486f7b1f421f3691b83b10b9f18837199e82 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132042 Auto-Submit: Bob Nystrom <rnystrom@google.com> Reviewed-by: Leaf Petersen <leafp@google.com> Commit-Queue: Bob Nystrom <rnystrom@google.com>
24 lines
567 B
Dart
24 lines
567 B
Dart
// Copyright (c) 2015, 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.
|
|
|
|
import 'dart:developer';
|
|
import 'package:expect/expect.dart';
|
|
|
|
void testUnbalancedStartFinish() {
|
|
Timeline.startSync('A');
|
|
Timeline.finishSync();
|
|
|
|
bool exceptionCaught = false;
|
|
try {
|
|
Timeline.finishSync();
|
|
} catch (e) {
|
|
exceptionCaught = true;
|
|
}
|
|
Expect.isTrue(exceptionCaught);
|
|
}
|
|
|
|
void main() {
|
|
testUnbalancedStartFinish();
|
|
}
|