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

Side by Side Diff: pkg/csslib/test/selector_test.dart

Issue 304603003: Make source map location information more readable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/csslib/test/error_test.dart ('k') | pkg/csslib/test/var_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library selector_test; 5 library selector_test;
6 6
7 import 'package:unittest/unittest.dart'; 7 import 'package:unittest/unittest.dart';
8 import 'testing.dart'; 8 import 'testing.dart';
9 import 'package:csslib/parser.dart'; 9 import 'package:csslib/parser.dart';
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 // TODO(terry): Move this failure case to a failure_test.dart when the analyzer 49 // TODO(terry): Move this failure case to a failure_test.dart when the analyzer
50 // and validator exit then they'll be a bunch more checks. 50 // and validator exit then they'll be a bunch more checks.
51 void testSelectorFailures() { 51 void testSelectorFailures() {
52 var errors = []; 52 var errors = [];
53 53
54 // Test for invalid class name (can't start with number). 54 // Test for invalid class name (can't start with number).
55 var selectorAst = selector('.foobar .1a-story .xyzzy', errors: errors); 55 var selectorAst = selector('.foobar .1a-story .xyzzy', errors: errors);
56 expect(errors.isEmpty, false); 56 expect(errors.isEmpty, false);
57 expect(errors[0].toString(), r''' 57 expect(errors[0].toString(),
58 error :1:9: name must start with a alpha character, but found a number 58 'error on line 1, column 9: name must start with a alpha character, but '
59 .foobar .1a-story .xyzzy 59 'found a number\n'
60 ^^'''); 60 '.foobar .1a-story .xyzzy\n'
61 ' ^^');
61 } 62 }
62 63
63 main() { 64 main() {
64 test('Valid Selectors', testSelectorSuccesses); 65 test('Valid Selectors', testSelectorSuccesses);
65 test('Invalid Selectors', testSelectorFailures); 66 test('Invalid Selectors', testSelectorFailures);
66 } 67 }
OLDNEW
« no previous file with comments | « pkg/csslib/test/error_test.dart ('k') | pkg/csslib/test/var_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698