dart-sdk/tests/lib/developer/timeline_test.dart
Robert Nystrom 7b44fa4265 Migrate "lib_2/developer" to NNBD.
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>
2020-01-17 00:16:15 +00:00

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();
}