dart-sdk/tests/standalone_2/io/gzip_format_exception_test.dart
Zichang Guo 8f7b40be77 [dart:io] Throw a FormatException when filters receive bad data.
Bug: https://github.com/dart-lang/sdk/issues/41270
Change-Id: Ie4de46129d6fe6ba00fde27f6c1c96cc3f42c888
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141914
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-04-08 20:38:34 +00:00

13 lines
429 B
Dart

// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:io';
import 'package:expect/expect.dart';
// This tests whether a FormatException is thrown on bad data.
main() {
Expect.throwsFormatException(() => GZipCodec().decoder.convert([10, 20, 30]));
}