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

Unified Diff: test/base64_test.dart

Issue 1255293010: Simplify base64 streaming decoder, drop decoding check. (Closed) Base URL: git@github.com:dart-lang/crypto.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« lib/src/base64.dart ('K') | « lib/src/base64.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/base64_test.dart
diff --git a/test/base64_test.dart b/test/base64_test.dart
index 76b586e23d8cbdb00ffb635be572b562ac9cf411..1f080fa8ea7a110e73b313f3b9586121443c1a8f 100644
--- a/test/base64_test.dart
+++ b/test/base64_test.dart
@@ -17,8 +17,6 @@ void main() {
test('decoder for malformed input', _testDecoderForMalformedInput);
test('encode decode lists', _testEncodeDecodeLists);
test('url safe encode-decode', _testUrlSafeEncodeDecode);
- test('consistent safe/unsafe character decoding',
- _testConsistentSafeUnsafeDecode);
test('percent-encoded padding character encode-decode',
_testPaddingCharacter);
test('streaming encoder', _testStreamingEncoder);
@@ -29,8 +27,6 @@ void main() {
_testStreamingEncoderForDecompositions);
test('streaming decoder for different decompositions of a string',
_testStreamingDecoderForDecompositions);
- test('consistent safe/unsafe character streaming decoding',
- _testConsistentSafeUnsafeStreamDecode);
test('streaming for encoded padding character',
_testStreamingForEncodedPadding);
test('old api', _testOldApi);
@@ -237,19 +233,6 @@ Future _testUrlSafeStreaming() async {
expect(streamedResult, encUrlSafe);
}
-void _testConsistentSafeUnsafeDecode() {
- expect(() {
- BASE64.decode(_INCONSISTENT_SAFE_RESULT);
- }, throwsFormatException);
-}
-
-Future _testConsistentSafeUnsafeStreamDecode() {
- expect(new Stream.fromIterable(_INCONSISTENT_SAFE_STREAMING_RESULT)
- .transform(BASE64.decoder)
- .toList(),
- throwsFormatException);
-}
-
Future _testStreamingForEncodedPadding() async {
List<String> withEncodedPadding = ['AA%', '3D', '%', '3', 'DEFGZ'];
List<int> decoded = BASE64.decode('AA==EFGZ');
« lib/src/base64.dart ('K') | « lib/src/base64.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698