| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 | 133 |
| 134 static void SuggestTestHarness(int tests) { | 134 static void SuggestTestHarness(int tests) { |
| 135 if (tests == 0) return; | 135 if (tests == 0) return; |
| 136 printf("Running multiple tests in sequence is deprecated and may cause " | 136 printf("Running multiple tests in sequence is deprecated and may cause " |
| 137 "bogus failure. Consider using tools/run-tests.py instead.\n"); | 137 "bogus failure. Consider using tools/run-tests.py instead.\n"); |
| 138 } | 138 } |
| 139 | 139 |
| 140 | 140 |
| 141 int main(int argc, char* argv[]) { | 141 int main(int argc, char* argv[]) { |
| 142 v8::V8::InitializeICU(); |
| 143 |
| 142 v8::internal::FlagList::SetFlagsFromCommandLine(&argc, argv, true); | 144 v8::internal::FlagList::SetFlagsFromCommandLine(&argc, argv, true); |
| 143 | 145 |
| 144 CcTestArrayBufferAllocator array_buffer_allocator; | 146 CcTestArrayBufferAllocator array_buffer_allocator; |
| 145 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); | 147 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); |
| 146 | 148 |
| 147 int tests_run = 0; | 149 int tests_run = 0; |
| 148 bool print_run_count = true; | 150 bool print_run_count = true; |
| 149 for (int i = 1; i < argc; i++) { | 151 for (int i = 1; i < argc; i++) { |
| 150 char* arg = argv[i]; | 152 char* arg = argv[i]; |
| 151 if (strcmp(arg, "--list") == 0) { | 153 if (strcmp(arg, "--list") == 0) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 } | 192 } |
| 191 } | 193 } |
| 192 if (print_run_count && tests_run != 1) | 194 if (print_run_count && tests_run != 1) |
| 193 printf("Ran %i tests.\n", tests_run); | 195 printf("Ran %i tests.\n", tests_run); |
| 194 v8::V8::Dispose(); | 196 v8::V8::Dispose(); |
| 195 return 0; | 197 return 0; |
| 196 } | 198 } |
| 197 | 199 |
| 198 RegisterThreadedTest *RegisterThreadedTest::first_ = NULL; | 200 RegisterThreadedTest *RegisterThreadedTest::first_ = NULL; |
| 199 int RegisterThreadedTest::count_ = 0; | 201 int RegisterThreadedTest::count_ = 0; |
| OLD | NEW |