blob: d8344851cd5e158ae240491b3c19d55525c08c5e [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 writeln([Object obj = ""])
/// Converts obj to a String by invoking Object.toString and adds the result to
/// this, followed by a newline.
/// @description Checks that this method adds a newline to the appended string
/// @author
import "../../../Utils/expect.dart";
main() {
StringBuffer sb = new StringBuffer();
Expect.equals("123\n", sb.toString());
Expect.equals("123\nnull\n", sb.toString());
Expect.equals("123\nnull\n\n\n", sb.toString());