Skip to content

Commit

Permalink
Updated test.
Browse files Browse the repository at this point in the history
  • Loading branch information
simphotonics committed Sep 17, 2024
1 parent 172cbca commit 0fc5653
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
3 changes: 0 additions & 3 deletions benchmark/custom_emitter_benchmark.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class CustomEmitter extends ColorPrintEmitter {
}

void main(List<String> args) {

group('List:', () {
final originalList = <int>[for (var i = 0; i < 1000; ++i) i];

Expand All @@ -27,7 +26,5 @@ void main(List<String> args) {
benchmark('construct', () {
var list = <int>[for (var i = 0; i < 1000; ++i) i];
}, report: reportMean);


});
}
2 changes: 1 addition & 1 deletion lib/src/command/export_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class ExportCommand extends ReportCommand {
final progressIndicator = progressIndicatorSubscription();

final results = await Future.wait(fResults);

for (final result in results) {
print('\$ '.style(ColorProfile.dim) + result.command());
if (isVerbose) {
Expand Down
23 changes: 11 additions & 12 deletions test/runner_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ void main() {
'Usage: dart run benchmark_runner <command> [arguments] <path to directory|file>\n'
'\n'
'Global options:\n'
'-h, --help Print this usage information.\n'
'-v, --verbose Enable to show more info and error messages.\n'
'-c, --[no-]color Enables colorized reporting.\n'
' (defaults to on)\n'
'-h, --help Print this usage information.\n'
'-v, --verbose Enable to show more info and error messages.\n'
'-m, --isMonochrome Disables colorized reporting.\n'
'\n'
'Available commands:\n'
' export Exports benchmark scores. A custom file extension and directory may be specified.\n'
Expand All @@ -46,13 +45,13 @@ void main() {
final usage = await process.stdout.rest.join('\n');

expect(
usage,equals(
'Runs benchmarks and prints a score report to stdout.\n'
'\n'
'Usage: benchmark_runner report [arguments] <path to directory|file>\n'
'-h, --help Print this usage information.\n'
'\n'
'Run "benchmark_runner help" to see global options.'));
usage,
equals('Runs benchmarks and prints a score report to stdout.\n'
'\n'
'Usage: benchmark_runner report [arguments] <path to directory|file>\n'
'-h, --help Print this usage information.\n'
'\n'
'Run "benchmark_runner help" to see global options.'));

// Assert that the process exits with code 0.
await process.shouldExit(0);
Expand Down Expand Up @@ -90,7 +89,7 @@ void main() {
usage,
'Exports benchmark scores. A custom file extension and directory may be specified.\n'
'\n'
'Usage: benchmark_runner export [arguments]\n'
'Usage: benchmark_runner export [arguments] <path to directory|file>\n'
'-h, --help Print this usage information.\n'
'-e, --extension Set file extension of exported files.\n'
' (defaults to "txt")\n'
Expand Down

0 comments on commit 0fc5653

Please sign in to comment.