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

Unified Diff: pkg/docgen/test/metadata_test.dart

Issue 1364553002: remove docgen source and targets from build (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: remove scripts Created 5 years, 3 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 | « pkg/docgen/test/inherited_comments_test.dart ('k') | pkg/docgen/test/method_param_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/test/metadata_test.dart
diff --git a/pkg/docgen/test/metadata_test.dart b/pkg/docgen/test/metadata_test.dart
deleted file mode 100644
index 87ea6f55f37e2560495050b8bd55186644461962..0000000000000000000000000000000000000000
--- a/pkg/docgen/test/metadata_test.dart
+++ /dev/null
@@ -1,65 +0,0 @@
-// 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.
-
-library async_await_test;
-
-import 'dart:io';
-
-import 'package:path/path.dart' as path;
-import 'package:unittest/unittest.dart';
-
-import '../lib/src/exports/mirrors_util.dart' as dart2js_util;
-import '../lib/src/models/annotation.dart';
-import '../lib/docgen.dart';
-
-const Map<String, String> SOURCES = const <String, String>{
- 'main.dart': '''
-import 'lib.dart' as lib;
-
-@lib.Annotation("foo", 42)
-main() {
-}
-''',
- 'lib.dart': '''
-class Annotation {
- final String arg1;
- final int arg2;
- const Annotation(this.arg1, this.arg2);
-}
-'''};
-
-main() {
- group('Generate docs for', () {
- test('files with annotations', () {
- var temporaryDir = Directory.systemTemp.createTempSync('metadata_');
- var uris = <Uri>[];
- SOURCES.forEach((name, code) {
- var fileName = path.join(temporaryDir.path, name);
- var file = new File(fileName);
- file.writeAsStringSync(code);
- uris.add(new Uri.file(fileName));
- });
-
- return getMirrorSystem(uris, false).then((mirrorSystem) {
- var library = new Library(mirrorSystem.libraries[uris[0]]);
- expect(library is Library, isTrue);
-
- var main = library.functions['main'];
- expect(main is Method, isTrue);
-
- var annotations = main.annotations;
- expect(annotations.length, equals(1));
-
- var annotation = annotations[0];
- expect(annotation is Annotation, isTrue);
-
- var map = annotation.toMap();
- expect(map['name'], equals('lib-dart.Annotation.Annotation-'));
- expect(map['parameters'].length, equals(2));
- expect(map['parameters'][0], equals('"foo"'));
- expect(map['parameters'][1], equals('42'));
- }).whenComplete(() => temporaryDir.deleteSync(recursive: true));
- });
- });
-}
« no previous file with comments | « pkg/docgen/test/inherited_comments_test.dart ('k') | pkg/docgen/test/method_param_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698