| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdio.h> | 5 #include <stdio.h> |
| 6 | 6 |
| 7 #include "bin/file.h" | 7 #include "bin/file.h" |
| 8 | 8 |
| 9 #include "vm/benchmark_test.h" | 9 #include "vm/benchmark_test.h" |
| 10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 dart::bin::DartUtils::OpenFile, | 106 dart::bin::DartUtils::OpenFile, |
| 107 dart::bin::DartUtils::ReadFile, | 107 dart::bin::DartUtils::ReadFile, |
| 108 dart::bin::DartUtils::WriteFile, | 108 dart::bin::DartUtils::WriteFile, |
| 109 dart::bin::DartUtils::CloseFile, | 109 dart::bin::DartUtils::CloseFile, |
| 110 NULL); | 110 NULL); |
| 111 ASSERT(err_msg == NULL); | 111 ASSERT(err_msg == NULL); |
| 112 // Apply the filter to all registered tests. | 112 // Apply the filter to all registered tests. |
| 113 TestCaseBase::RunAll(); | 113 TestCaseBase::RunAll(); |
| 114 // Apply the filter to all registered benchmarks. | 114 // Apply the filter to all registered benchmarks. |
| 115 Benchmark::RunAll(argv[0]); | 115 Benchmark::RunAll(argv[0]); |
| 116 | |
| 117 err_msg = Dart::Cleanup(); | |
| 118 ASSERT(err_msg == NULL); | |
| 119 | |
| 120 // Print a warning message if no tests or benchmarks were matched. | 116 // Print a warning message if no tests or benchmarks were matched. |
| 121 if (run_matches == 0) { | 117 if (run_matches == 0) { |
| 122 fprintf(stderr, "No tests matched: %s\n", run_filter); | 118 fprintf(stderr, "No tests matched: %s\n", run_filter); |
| 123 return 1; | 119 return 1; |
| 124 } | 120 } |
| 125 return 0; | 121 return 0; |
| 126 } | 122 } |
| 127 | 123 |
| 128 } // namespace dart | 124 } // namespace dart |
| 129 | 125 |
| 130 | 126 |
| 131 int main(int argc, const char** argv) { | 127 int main(int argc, const char** argv) { |
| 132 return dart::Main(argc, argv); | 128 return dart::Main(argc, argv); |
| 133 } | 129 } |
| OLD | NEW |