blob: ae06e7a7b73ac03e21a7f8f43deba4c3c0f5eb8e [file] [log] [blame]
// Copyright (c) 2014, Google Inc. 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.
library benchmark_harness_test;
import 'package:benchmark_harness/benchmark_harness.dart';
import 'package:unittest/unittest.dart';
void main() {
group('benchmark_harness', () {
test('run is called', () {
MockBenchmark benchmark = new MockBenchmark();
double micros = benchmark.measure();
expect(micros, isPositive);
expect(benchmark.runCount, isPositive);
});
});
}
class MockBenchmark extends BenchmarkBase {
int runCount = 0;
MockBenchmark() : super('mock benchmark');
void run() {
runCount++;
}
}