| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 import 'dart:async' show | |
| 6 Future; | |
| 7 | |
| 8 import '../../tests/service_tests/service_tests.dart' show | |
| 9 CompileServiceRule, | |
| 10 ServiceTest, | |
| 11 CcRule, | |
| 12 CopyRule, | |
| 13 BuildSnapshotRule, | |
| 14 RunSnapshotRule; | |
| 15 | |
| 16 const String thisDirectory = 'samples/todomvc'; | |
| 17 | |
| 18 class TodoMVCServiceTest extends ServiceTest { | |
| 19 TodoMVCServiceTest() | |
| 20 : super('todomvc'); | |
| 21 | |
| 22 String get idlPath => '$thisDirectory/todomvc_service.idl'; | |
| 23 String get servicePath => '$outputDirectory/todomvc.dart'; | |
| 24 String get snapshotPath => '$outputDirectory/todomvc.snapshot'; | |
| 25 String get executablePath => '$outputDirectory/todomvc_sample'; | |
| 26 | |
| 27 Future<Null> prepare() async { | |
| 28 rules.add(new CompileServiceRule(idlPath, outputDirectory)); | |
| 29 rules.add(new CopyRule(thisDirectory, outputDirectory, [ | |
| 30 'model.dart', | |
| 31 'todomvc.dart', | |
| 32 'todomvc_impl.dart', | |
| 33 'dart/presentation_graph.dart', | |
| 34 'dart/todomvc_presenter.dart', | |
| 35 'dart/todomvc_presenter_model.dart', | |
| 36 ])); | |
| 37 rules.add(new CcRule( | |
| 38 executable: executablePath, | |
| 39 includePaths: [outputDirectory, '$outputDirectory/cc'], | |
| 40 sources: [ | |
| 41 '$thisDirectory/todomvc.cc', | |
| 42 '$thisDirectory/todomvc_shared.cc', | |
| 43 '$thisDirectory/cc/todomvc_presenter.cc', | |
| 44 '$outputDirectory/cc/struct.cc', | |
| 45 '$outputDirectory/cc/unicode.cc', | |
| 46 '$outputDirectory/cc/todomvc_service.cc'])); | |
| 47 rules.add(new BuildSnapshotRule(servicePath, snapshotPath)); | |
| 48 rules.add(new RunSnapshotRule(executablePath, snapshotPath)); | |
| 49 } | |
| 50 } | |
| 51 | |
| 52 final ServiceTest serviceTest = new TodoMVCServiceTest(); | |
| OLD | NEW |