Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit

Permalink
Migrate "lib_2/developer" to NNBD.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
munificent authored and commit-bot@chromium.org committed Jan 17, 2020
1 parent c7745a1 commit 7b44fa4
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/lib/developer/inspect_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// 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';

class Point {
int x, y;
Point(this.x, this.y);
}

void main() {
var p_in = new Point(3, 4);
var p_out = inspect(p_in);
Expect.isTrue(identical(p_in, p_out));
}
23 changes: 23 additions & 0 deletions tests/lib/developer/timeline_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// 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();
}

0 comments on commit 7b44fa4

Please sign in to comment.