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

Side by Side Diff: pkg/source_maps/test/builder_test.dart

Issue 421723004: Remove support for the old Span classes from source_maps. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 6 years, 4 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/source_maps/lib/src/span_wrapper.dart ('k') | pkg/source_maps/test/common.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 test.source_maps_test; 5 library test.source_maps_test;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
9 import 'package:source_maps/source_maps.dart'; 9 import 'package:source_maps/source_maps.dart';
10 import 'common.dart'; 10 import 'common.dart';
11 11
12 main() { 12 main() {
13 test('builder - with span', () { 13 test('builder - with span', () {
14 var map = (new SourceMapBuilder() 14 var map = (new SourceMapBuilder()
15 ..addSpan(inputVar1, outputVar1) 15 ..addSpan(inputVar1, outputVar1)
16 ..addSpan(inputFunction, outputFunction) 16 ..addSpan(inputFunction, outputFunction)
17 ..addSpan(inputVar2, outputVar2) 17 ..addSpan(inputVar2, outputVar2)
18 ..addSpan(inputExpr, outputExpr)) 18 ..addSpan(inputExpr, outputExpr))
19 .build(output.url); 19 .build(output.url.toString());
20 expect(map, equals(EXPECTED_MAP)); 20 expect(map, equals(EXPECTED_MAP));
21 }); 21 });
22 22
23 test('builder - with location', () { 23 test('builder - with location', () {
24 var str = (new SourceMapBuilder() 24 var str = (new SourceMapBuilder()
25 ..addLocation(inputVar1.start, outputVar1.start, 'longVar1') 25 ..addLocation(inputVar1.start, outputVar1.start, 'longVar1')
26 ..addLocation(inputFunction.start, outputFunction.start, 'longName') 26 ..addLocation(inputFunction.start, outputFunction.start, 'longName')
27 ..addLocation(inputVar2.start, outputVar2.start, 'longVar2') 27 ..addLocation(inputVar2.start, outputVar2.start, 'longVar2')
28 ..addLocation(inputExpr.start, outputExpr.start, null)) 28 ..addLocation(inputExpr.start, outputExpr.start, null))
29 .toJson(output.url); 29 .toJson(output.url.toString());
30 expect(str, JSON.encode(EXPECTED_MAP)); 30 expect(str, JSON.encode(EXPECTED_MAP));
31 }); 31 });
32 } 32 }
OLDNEW
« no previous file with comments | « pkg/source_maps/lib/src/span_wrapper.dart ('k') | pkg/source_maps/test/common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698