| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 do { | 283 do { |
| 284 arg_index++; | 284 arg_index++; |
| 285 } while (argc > arg_index && IsFlag(argv[arg_index])); | 285 } while (argc > arg_index && IsFlag(argv[arg_index])); |
| 286 if (argc > arg_index) { | 286 if (argc > arg_index) { |
| 287 // Next argument is the exception type identifier. | 287 // Next argument is the exception type identifier. |
| 288 expects.type = argv[arg_index]; | 288 expects.type = argv[arg_index]; |
| 289 do { | 289 do { |
| 290 arg_index++; | 290 arg_index++; |
| 291 } while (argc > arg_index && IsFlag(argv[arg_index])); | 291 } while (argc > arg_index && IsFlag(argv[arg_index])); |
| 292 if (argc > arg_index) { | 292 if (argc > arg_index) { |
| 293 expects.beg_pos = atoi(argv[arg_index]); | 293 expects.beg_pos = atoi(argv[arg_index]); // NOLINT |
| 294 do { | 294 do { |
| 295 arg_index++; | 295 arg_index++; |
| 296 } while (argc > arg_index && IsFlag(argv[arg_index])); | 296 } while (argc > arg_index && IsFlag(argv[arg_index])); |
| 297 if (argc > arg_index) { | 297 if (argc > arg_index) { |
| 298 expects.end_pos = atoi(argv[arg_index]); | 298 expects.end_pos = atoi(argv[arg_index]); // NOLINT |
| 299 } | 299 } |
| 300 } | 300 } |
| 301 } | 301 } |
| 302 } | 302 } |
| 303 return expects; | 303 return expects; |
| 304 } | 304 } |
| 305 | 305 |
| 306 | 306 |
| 307 int main(int argc, const char* argv[]) { | 307 int main(int argc, const char* argv[]) { |
| 308 // Parse command line. | 308 // Parse command line. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 if (data.stack_overflow()) { | 370 if (data.stack_overflow()) { |
| 371 fail(&data, "ERROR: Stack overflow\n"); | 371 fail(&data, "ERROR: Stack overflow\n"); |
| 372 } | 372 } |
| 373 | 373 |
| 374 // Check that the expected exception is thrown, if an exception is | 374 // Check that the expected exception is thrown, if an exception is |
| 375 // expected. | 375 // expected. |
| 376 CheckException(&data, &expects); | 376 CheckException(&data, &expects); |
| 377 | 377 |
| 378 return EXIT_SUCCESS; | 378 return EXIT_SUCCESS; |
| 379 } | 379 } |
| OLD | NEW |