Files
sdk/pkg/analyzer/test/dart/element/element_test.dart
T
Konstantin Shcheglov 11fa3e0e2b Don't extent EngineTestCase where possible.
R=brianwilkerson@google.com

Change-Id: I6489a9bbe0bd442d1356c34fcedfde811e6f9778
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118505
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-24 14:05:19 +00:00

27 lines
790 B
Dart

// Copyright (c) 2014, 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 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/src/generated/testing/element_factory.dart';
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ElementKindTest);
});
}
@reflectiveTest
class ElementKindTest {
void test_of_nonNull() {
expect(ElementKind.of(ElementFactory.classElement2("A")),
same(ElementKind.CLASS));
}
void test_of_null() {
expect(ElementKind.of(null), same(ElementKind.ERROR));
}
}