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

Unified Diff: test/checker/inferred_type_test.dart

Issue 1166683005: upgrade dependencies, including migration to package:test (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/checker/checker_test.dart ('k') | test/checker/self_host_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/checker/inferred_type_test.dart
diff --git a/test/checker/inferred_type_test.dart b/test/checker/inferred_type_test.dart
index 4b953751357ff8de0d30caa572ebceed5f8ed5be..3a0cccc47de760c7ab11a0284e0ea5242c2c24a1 100644
--- a/test/checker/inferred_type_test.dart
+++ b/test/checker/inferred_type_test.dart
@@ -5,15 +5,11 @@
/// Tests for type inference.
library dev_compiler.test.inferred_type_test;
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
import 'package:dev_compiler/src/testing.dart';
-import '../test_util.dart';
-
void main() {
- configureTest();
-
test('infer type on var', () {
// Error also expected when declared type is `int`.
testChecker({
@@ -36,34 +32,37 @@ void main() {
});
});
- // Error when declared type is `int` and assigned null.
- testChecker({
- '/main.dart': '''
- test1() {
- int x = 3;
- x = /*severe:StaticTypeError*/null;
- }
- '''
- }, nonnullableTypes: <String>['int', 'double']);
+ test('Error when declared type is `int` and assigned null.', () {
+ testChecker({
+ '/main.dart': '''
+ test1() {
+ int x = 3;
+ x = /*severe:StaticTypeError*/null;
+ }
+ '''
+ }, nonnullableTypes: <String>['int', 'double']);
+ });
- // Error when inferred type is `int` and assigned null.
- testChecker({
- '/main.dart': '''
- test1() {
- var x = 3;
- x = /*severe:StaticTypeError*/null;
- }
- '''
- }, nonnullableTypes: <String>['int', 'double']);
+ test('Error when inferred type is `int` and assigned null.', () {
+ testChecker({
+ '/main.dart': '''
+ test1() {
+ var x = 3;
+ x = /*severe:StaticTypeError*/null;
+ }
+ '''
+ }, nonnullableTypes: <String>['int', 'double']);
+ });
- // No error when declared type is `num` and assigned null.
- testChecker({
- '/main.dart': '''
- test1() {
- num x = 3;
- x = null;
- }
- '''
+ test('No error when declared type is `num` and assigned null.', () {
+ testChecker({
+ '/main.dart': '''
+ test1() {
+ num x = 3;
+ x = null;
+ }
+ '''
+ });
});
test('do not infer type on dynamic', () {
« no previous file with comments | « test/checker/checker_test.dart ('k') | test/checker/self_host_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698