| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 #ifndef VM_UNIT_TEST_H_ | 5 #ifndef VM_UNIT_TEST_H_ |
| 6 #define VM_UNIT_TEST_H_ | 6 #define VM_UNIT_TEST_H_ |
| 7 | 7 |
| 8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 | 9 |
| 10 #include "platform/globals.h" | 10 #include "platform/globals.h" |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 class CodeGenTest { | 447 class CodeGenTest { |
| 448 public: | 448 public: |
| 449 explicit CodeGenTest(const char* name); | 449 explicit CodeGenTest(const char* name); |
| 450 ~CodeGenTest() { } | 450 ~CodeGenTest() { } |
| 451 | 451 |
| 452 // Accessors. | 452 // Accessors. |
| 453 const Function& function() const { return function_; } | 453 const Function& function() const { return function_; } |
| 454 | 454 |
| 455 SequenceNode* node_sequence() const { return node_sequence_; } | 455 SequenceNode* node_sequence() const { return node_sequence_; } |
| 456 | 456 |
| 457 void set_default_parameter_values(const Array& value) { | 457 void set_default_parameter_values(ZoneGrowableArray<const Instance*>* value) { |
| 458 default_parameter_values_ = value.raw(); | 458 default_parameter_values_ = value; |
| 459 } | 459 } |
| 460 | 460 |
| 461 // Compile test and set code in function. | 461 // Compile test and set code in function. |
| 462 void Compile(); | 462 void Compile(); |
| 463 | 463 |
| 464 private: | 464 private: |
| 465 Function& function_; | 465 Function& function_; |
| 466 SequenceNode* node_sequence_; | 466 SequenceNode* node_sequence_; |
| 467 Array& default_parameter_values_; | 467 ZoneGrowableArray<const Instance*>* default_parameter_values_; |
| 468 | 468 |
| 469 DISALLOW_COPY_AND_ASSIGN(CodeGenTest); | 469 DISALLOW_COPY_AND_ASSIGN(CodeGenTest); |
| 470 }; | 470 }; |
| 471 | 471 |
| 472 | 472 |
| 473 class CompilerTest : public AllStatic { | 473 class CompilerTest : public AllStatic { |
| 474 public: | 474 public: |
| 475 // Test the Compiler::CompileScript functionality by checking the return | 475 // Test the Compiler::CompileScript functionality by checking the return |
| 476 // value to see if no parse errors were reported. | 476 // value to see if no parse errors were reported. |
| 477 static bool TestCompileScript(const Library& library, const Script& script); | 477 static bool TestCompileScript(const Library& library, const Script& script); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 } \ | 517 } \ |
| 518 } else { \ | 518 } else { \ |
| 519 dart::Expect(__FILE__, __LINE__).Fail("expected True, but was '%s'\n", \ | 519 dart::Expect(__FILE__, __LINE__).Fail("expected True, but was '%s'\n", \ |
| 520 #handle); \ | 520 #handle); \ |
| 521 } \ | 521 } \ |
| 522 } while (0) | 522 } while (0) |
| 523 | 523 |
| 524 } // namespace dart | 524 } // namespace dart |
| 525 | 525 |
| 526 #endif // VM_UNIT_TEST_H_ | 526 #endif // VM_UNIT_TEST_H_ |
| OLD | NEW |