blob: 8f771521e68538861d0e556655e132547e63e9b3 [file] [log] [blame]
// Copyright (c) 2017, 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.
// @dart = 2.9
import 'dart:convert';
/// @assertion Codec<T, S> inverted
/// Inverts this.
/// The encoder and decoder of the resulting codec are swapped.
/// @description Checks that [inverted] return codec with swapped encoder
/// and decoder
/// @author a.semenov@unipro.ru
import "dart:io";
import "../../../Utils/expect.dart";
main() {
const SystemEncoding systemEncoding = const SystemEncoding();
Codec inverted = systemEncoding.inverted;
Expect.equals(systemEncoding.decoder, inverted.encoder);
Expect.equals(systemEncoding.encoder, inverted.decoder);
}