blob: bd5f1381de3692aa3a6c1f830cd0f4f941eeace9 [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.
/// @assertion void writeCharCode(int charCode)
/// Writes the charCode to this.
/// This method is equivalent to write(new String.fromCharCode(charCode)).
/// @description Checks that this method writes the charCode to this.
/// @author
import "dart:convert";
import "../../../Utils/expect.dart";
main() {
for (int i = 0; i < 256; i++) {
StringBuffer stringSink = new StringBuffer();
ClosableStringSink sink =
new ClosableStringSink.fromStringSink(stringSink, () {});
Expect.equals(new String.fromCharCode(i), stringSink.toString());