提交 da3e55c8 编写于 作者: H Hixie

Add a test for the sector app.

This also moves the test for stocks into a new tests/examples/
directory, where we can put tests that test the examples.

TBR=abarth

Review URL: https://codereview.chromium.org/1182223004.
上级 a4196226
......@@ -28,7 +28,7 @@ RenderBox initCircle() {
class SectorApp extends App {
RenderBoxToRenderSectorAdapter sectors = initCircle();
math.Random rand = new math.Random();
math.Random rand = new math.Random(1);
void addSector() {
double deltaTheta;
......
此差异已折叠。
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'package:sky/app/view.dart';
import 'package:sky/widgets/widget.dart';
import '../../examples/widgets/sector.dart';
import '../resources/display_list.dart';
main() async {
TestRenderView testRenderView = new TestRenderView();
SectorApp app = new SectorApp();
runApp(app, renderViewOverride: testRenderView);
await testRenderView.checkFrame();
app.addSector();
await testRenderView.checkFrame();
app.addSector();
await testRenderView.checkFrame();
app.addSector();
await testRenderView.checkFrame();
app.removeSector();
await testRenderView.checkFrame();
app.removeSector();
await testRenderView.checkFrame();
app.addSector();
await testRenderView.checkFrame();
testRenderView.endTest();
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册