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

Side by Side Diff: test/indenting_writer_test.dart

Issue 269823003: Parameterize uri resolution and parsing of options, use package:path (Closed) Base URL: git@github.com:dart-lang/dart-protoc-plugin.git@master
Patch Set: Created 6 years, 7 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
OLDNEW
1 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 library indenting_writer_test; 6 library indenting_writer_test;
7 7
8 import 'package:protoc-plugin/protoc.dart'; 8 import 'package:protoc_plugin/protoc.dart';
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 10
11 void main() { 11 void main() {
12 test('testIndentingWriter', () { 12 test('testIndentingWriter', () {
13 String blockExpected = r'''class test{ 13 String blockExpected = r'''class test{
14 body; 14 body;
15 } 15 }
16 '''; 16 ''';
17 17
18 var iob = new MemoryWriter(); 18 var iob = new MemoryWriter();
19 var writer = new IndentingWriter(' ', iob); 19 var writer = new IndentingWriter(' ', iob);
20 writer.addBlock('class test{', '}', () { 20 writer.addBlock('class test{', '}', () {
21 writer.println('body;'); 21 writer.println('body;');
22 }); 22 });
23 expect(iob.toString(), blockExpected); 23 expect(iob.toString(), blockExpected);
24 }); 24 });
25 } 25 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698