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

Unified Diff: pkg/docgen/test/constant_argument_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/async_await_test.dart ('k') | pkg/docgen/test/generate_json_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/test/constant_argument_test.dart
diff --git a/pkg/docgen/test/constant_argument_test.dart b/pkg/docgen/test/constant_argument_test.dart
deleted file mode 100644
index bf5a84a34ff6e9e79b629b8c4c32cfac87b80689..0000000000000000000000000000000000000000
--- a/pkg/docgen/test/constant_argument_test.dart
+++ /dev/null
@@ -1,80 +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 docgen.test.typedef;
-
-import 'dart:convert';
-import 'dart:io';
-
-import 'package:path/path.dart' as p;
-import 'package:scheduled_test/descriptor.dart' as d;
-import 'package:scheduled_test/scheduled_test.dart';
-
-import 'util.dart';
-import '../lib/docgen.dart' as dg;
-
-void main() {
-
- setUp(() {
- scheduleTempDir();
- });
-
- test('argument default values', () {
- schedule(() {
- var codeDir = getMultiLibraryCodePath();
- expect(FileSystemEntity.isDirectorySync(codeDir), isTrue);
- return dg.docgen([codeDir], out: p.join(d.defaultRoot, 'docs'));
- });
-
- schedule(() {
- var path = p.join(d.defaultRoot, 'docs', 'test_lib.json');
- var dartCoreJson = new File(path).readAsStringSync();
-
- var testLibBar = JSON.decode(dartCoreJson) as Map<String, dynamic>;
-
- //
- // Validate function doc references
- //
- var functionDef =
- testLibBar['functions']['methods']['positionalDefaultValues']
- as Map<String, dynamic>;
-
- var params = functionDef['parameters'] as Map<String, dynamic>;
-
- expect(params.keys, orderedEquals(_PARAM_NAME_ORDER),
- reason: 'parameter order must be maintained');
-
- var vals = {};
- params.forEach((paramName, paramHash) {
- expect(_PARAM_VALUES, contains(paramName));
- expect(paramHash['value'], _PARAM_VALUES[paramName],
- reason: 'Value for $paramName should match expected');
- });
- });
- });
-}
-
-final _PARAM_VALUES = {
- "intConst": "42",
- "boolConst": "true",
- "listConst": 'const [true, 42, "Shanna", null, 3.14, const []]',
- "stringConst": "\"Shanna\"",
- "mapConst": 'const {"a": 1, 2: true, "c": const [1, null, true]}',
- "emptyMap": 'const {}',
- "referencedConst": "INT_CONST",
- "constructedConstant1": "const ConstClass<int>(0, true)",
- "constructedConstant2": 'const ConstClass(1, false, str: "str")'
-};
-
-const _PARAM_NAME_ORDER = const [
- "intConst",
- "boolConst",
- "listConst",
- "stringConst",
- "mapConst",
- "emptyMap",
- "referencedConst",
- "constructedConstant1",
- "constructedConstant2"
-];
« no previous file with comments | « pkg/docgen/test/async_await_test.dart ('k') | pkg/docgen/test/generate_json_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698