blob: d912d15fa164a5aa86d96457f9cd171deb031717 [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 String toString()
/// Returns a string representation of this object.
/// @description Checks that this method returns correct string representation of
/// the data URI. Test data URIs created by parse()
/// @author sgrekhov@unipro.ru
import "../../../Utils/expect.dart";
check(String uri) {
UriData uriData = UriData.parse(uri);
Expect.equals(uri, uriData.toString());
}
main() {
check("data:text/plain;a=b;base64,dataaaa=");
check("data:image/gif;a=b;charset=utf-8;base64,dataaaa=");
check("data:,");
}