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

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

Issue 12207008: Move source maps package to the dart repo, so it can be used by other internal (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: updates Created 7 years, 9 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/pubspec.yaml ('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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library test.source_maps_test;
6
7 import 'dart:json' as json;
8 import 'package:unittest/unittest.dart';
9 import 'package:source_maps/source_maps.dart';
10 import 'common.dart';
11
12 main() {
13 test('builder - with span', () {
14 var map = (new SourceMapBuilder()
15 ..addSpan(inputVar1, outputVar1)
16 ..addSpan(inputFunction, outputFunction)
17 ..addSpan(inputVar2, outputVar2)
18 ..addSpan(inputExpr, outputExpr))
19 .build(output.url);
20 expect(map, equals(EXPECTED_MAP));
21 });
22
23 test('builder - with location', () {
24 var str = (new SourceMapBuilder()
25 ..addLocation(inputVar1.start, outputVar1.start, 'longVar1')
26 ..addLocation(inputFunction.start, outputFunction.start, 'longName')
27 ..addLocation(inputVar2.start, outputVar2.start, 'longVar2')
28 ..addLocation(inputExpr.start, outputExpr.start, null))
29 .toJson(output.url);
30 expect(str, json.stringify(EXPECTED_MAP));
31 });
32 }
OLDNEW
« no previous file with comments | « pkg/source_maps/pubspec.yaml ('k') | pkg/source_maps/test/common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698