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

Side by Side Diff: tests/lib/convert/codec1_test.dart

Issue 19941002: Remove dart:codec and move classes into dart:convert. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 5 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 | « tests/lib/codec/codec2_test.dart ('k') | tests/lib/convert/codec2_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) 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 import 'dart:codec';
6 import 'dart:convert'; 5 import 'dart:convert';
7 6
8 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
9 8
10 class MyCodec extends Codec<int, String> { 9 class MyCodec extends Codec<int, String> {
11 const MyCodec(); 10 const MyCodec();
12 11
13 Converter<int, String> get encoder => new IntStringConverter(); 12 Converter<int, String> get encoder => new IntStringConverter();
14 Converter<String, int> get decoder => new StringIntConverter(); 13 Converter<String, int> get decoder => new StringIntConverter();
15 } 14 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 60
62 inverted = TEST_CODEC2.inverted; 61 inverted = TEST_CODEC2.inverted;
63 fused = TEST_CODEC2.fuse(inverted); 62 fused = TEST_CODEC2.fuse(inverted);
64 Expect.equals(499, fused.encode(0)); 63 Expect.equals(499, fused.encode(0));
65 Expect.equals(499, fused.decode(0)); 64 Expect.equals(499, fused.decode(0));
66 65
67 fused = TEST_CODEC.fuse(inverted); 66 fused = TEST_CODEC.fuse(inverted);
68 Expect.equals(405, fused.encode(5)); 67 Expect.equals(405, fused.encode(5));
69 Expect.equals(101, fused.decode(2)); 68 Expect.equals(101, fused.decode(2));
70 } 69 }
OLDNEW
« no previous file with comments | « tests/lib/codec/codec2_test.dart ('k') | tests/lib/convert/codec2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698