blob: 6a0dab07747234bf728274a3c771309d4e2e680a [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.
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);
}