OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 this.loadExpectedOutput(outputOrFileName) : outputOrFileName; | 327 this.loadExpectedOutput(outputOrFileName) : outputOrFileName; |
328 var outputPos = 0; | 328 var outputPos = 0; |
329 var diffs = this.diffs = []; | 329 var diffs = this.diffs = []; |
330 var realOut = this.realOut = []; | 330 var realOut = this.realOut = []; |
331 var unexpectedOut = this.unexpectedOut = null; | 331 var unexpectedOut = this.unexpectedOut = null; |
332 | 332 |
333 this.oldPrint = print; | 333 this.oldPrint = print; |
334 print = function(str) { | 334 print = function(str) { |
335 var strSplit = str.split('\n'); | 335 var strSplit = str.split('\n'); |
336 for (var i = 0; i < strSplit.length; ++i) { | 336 for (var i = 0; i < strSplit.length; ++i) { |
337 s = strSplit[i]; | 337 var s = strSplit[i]; |
338 realOut.push(s); | 338 realOut.push(s); |
339 if (outputPos < expectedOut.length) { | 339 if (outputPos < expectedOut.length) { |
340 if (expectedOut[outputPos] != s) { | 340 if (expectedOut[outputPos] != s) { |
341 diffs.push('line ' + outputPos + ': expected <' + | 341 diffs.push('line ' + outputPos + ': expected <' + |
342 expectedOut[outputPos] + '> found <' + s + '>\n'); | 342 expectedOut[outputPos] + '> found <' + s + '>\n'); |
343 } | 343 } |
344 outputPos++; | 344 outputPos++; |
345 } else { | 345 } else { |
346 unexpectedOut = true; | 346 unexpectedOut = true; |
347 } | 347 } |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 false, false, null, | 393 false, false, null, |
394 'tickprocessor-test.log', 'tickprocessor-test.default'], | 394 'tickprocessor-test.log', 'tickprocessor-test.default'], |
395 'SeparateIc': [ | 395 'SeparateIc': [ |
396 true, false, null, | 396 true, false, null, |
397 'tickprocessor-test.log', 'tickprocessor-test.separate-ic'], | 397 'tickprocessor-test.log', 'tickprocessor-test.separate-ic'], |
398 'IgnoreUnknown': [ | 398 'IgnoreUnknown': [ |
399 false, true, null, | 399 false, true, null, |
400 'tickprocessor-test.log', 'tickprocessor-test.ignore-unknown'], | 400 'tickprocessor-test.log', 'tickprocessor-test.ignore-unknown'], |
401 'GcState': [ | 401 'GcState': [ |
402 false, false, TickProcessor.VmStates.GC, | 402 false, false, TickProcessor.VmStates.GC, |
403 'tickprocessor-test.log', 'tickprocessor-test.gc-state'] | 403 'tickprocessor-test.log', 'tickprocessor-test.gc-state'], |
| 404 'FunctionInfo': [ |
| 405 false, false, null, |
| 406 'tickprocessor-test-func-info.log', 'tickprocessor-test.func-info'] |
404 }; | 407 }; |
405 for (var testName in testData) { | 408 for (var testName in testData) { |
406 print('=== testProcessing-' + testName + ' ==='); | 409 print('=== testProcessing-' + testName + ' ==='); |
407 driveTickProcessorTest.apply(null, testData[testName]); | 410 driveTickProcessorTest.apply(null, testData[testName]); |
408 } | 411 } |
409 })(); | 412 })(); |
OLD | NEW |