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

Unified Diff: pkg/polymer/test/build/utils_test.dart

Issue 23757034: Rearranges the polymer package now that the old compiler is gone. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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/polymer/test/build/script_compactor_test.dart ('k') | pkg/polymer/test/transform/all_phases_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/test/build/utils_test.dart
diff --git a/pkg/polymer/test/build/utils_test.dart b/pkg/polymer/test/build/utils_test.dart
deleted file mode 100644
index 393d21561b2bb8a0c6873367513baf86a1c452f7..0000000000000000000000000000000000000000
--- a/pkg/polymer/test/build/utils_test.dart
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (c) 2012, 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.
-
-/** Tests for some of the utility helper functions used by the compiler. */
-library utils_test;
-
-import 'package:unittest/compact_vm_config.dart';
-import 'package:unittest/unittest.dart';
-import 'package:polymer/src/utils.dart';
-
-main() {
- useCompactVMConfiguration();
-
- for (bool startUppercase in [false, true]) {
- Matcher caseEquals(String str) {
- if (startUppercase) str = str[0].toUpperCase() + str.substring(1);
- return equals(str);
- }
-
- camelCase(str) => toCamelCase(str, startUppercase: startUppercase);
-
- group('toCamelCase startUppercase=$startUppercase', () {
- test('empty', () {
- expect(camelCase(''), equals(''));
- });
-
- test('single token', () {
- expect(camelCase('a'), caseEquals('a'));
- expect(camelCase('ab'), caseEquals('ab'));
- expect(camelCase('Ab'), caseEquals('Ab'));
- expect(camelCase('AB'), caseEquals('AB'));
- expect(camelCase('long_word'), caseEquals('long_word'));
- });
-
- test('dashes in the middle', () {
- expect(camelCase('a-b'), caseEquals('aB'));
- expect(camelCase('a-B'), caseEquals('aB'));
- expect(camelCase('A-b'), caseEquals('AB'));
- expect(camelCase('long-word'), caseEquals('longWord'));
- });
-
- test('leading/trailing dashes', () {
- expect(camelCase('-hi'), caseEquals('Hi'));
- expect(camelCase('hi-'), caseEquals('hi'));
- expect(camelCase('hi-friend-'), caseEquals('hiFriend'));
- });
-
- test('consecutive dashes', () {
- expect(camelCase('--hi-friend'), caseEquals('HiFriend'));
- expect(camelCase('hi--friend'), caseEquals('hiFriend'));
- expect(camelCase('hi-friend--'), caseEquals('hiFriend'));
- });
- });
- }
-
- group('toHyphenedName', () {
- test('empty', () {
- expect(toHyphenedName(''), '');
- });
-
- test('all lower case', () {
- expect(toHyphenedName('a'), 'a');
- expect(toHyphenedName('a-b'), 'a-b');
- expect(toHyphenedName('aBc'), 'a-bc');
- expect(toHyphenedName('abC'), 'ab-c');
- expect(toHyphenedName('abc-d'), 'abc-d');
- expect(toHyphenedName('long_word'), 'long_word');
- });
-
- test('capitalized letters in the middle/end', () {
- expect(toHyphenedName('aB'), 'a-b');
- expect(toHyphenedName('longWord'), 'long-word');
- });
-
- test('leading capital letters', () {
- expect(toHyphenedName('Hi'), 'hi');
- expect(toHyphenedName('Hi-'), 'hi-');
- expect(toHyphenedName('HiFriend'), 'hi-friend');
- });
-
- test('consecutive capital letters', () {
- expect(toHyphenedName('aBC'), 'a-b-c');
- });
- });
-}
« no previous file with comments | « pkg/polymer/test/build/script_compactor_test.dart ('k') | pkg/polymer/test/transform/all_phases_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698