11fa3e0e2b
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>
27 lines
790 B
Dart
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));
|
|
}
|
|
}
|