b62e715073
Split off from https://dart-review.googlesource.com/c/sdk/+/140290/33 to make that CL smaller and review the test generator separately. Because of the amount of corner cases in the calling conventions that need to be covered, the tests are generated, rather than hand-written. The tests are tested in the dependent CL. Tests are ignored in status file and are un-ignored in dependent CL. Change-Id: I5507f52229793fdf07da3066b49045fdb703a69d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168829 Commit-Queue: Daco Harkes <dacoharkes@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
23 lines
760 B
Dart
23 lines
760 B
Dart
// Copyright (c) 2020, 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.
|
|
|
|
extension TestGeneratorStringExtension on String {
|
|
String upperCaseFirst() => "${this[0].toUpperCase()}${this.substring(1)}";
|
|
|
|
String lowerCaseFirst() => "${this[0].toLowerCase()}${this.substring(1)}";
|
|
|
|
String makeCComment() => "// " + split("\n").join("\n// ");
|
|
|
|
String makeDartDocComment() => "/// " + split("\n").join("\n/// ");
|
|
|
|
String limitTo(int lenght) {
|
|
if (this.length > lenght) {
|
|
return substring(0, lenght);
|
|
}
|
|
return this;
|
|
}
|
|
|
|
String trimCouts() => replaceAll('" << "', '').replaceAll('"<< "', '');
|
|
}
|