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

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

Issue 24149003: Port of github.com/polymer/polymer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase 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/take_attributes_test.html ('k') | samples/third_party/todomvc/web/app.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/test/utils_test.dart
diff --git a/pkg/polymer/test/utils_test.dart b/pkg/polymer/test/utils_test.dart
deleted file mode 100644
index 335e538be3b2dcc4de40464bea3e14584153fa5c..0000000000000000000000000000000000000000
--- a/pkg/polymer/test/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 polymer.test.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/take_attributes_test.html ('k') | samples/third_party/todomvc/web/app.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698