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_api.h" | 8 #include "include/dart_api.h" |
9 | 9 |
10 #include "vm/ast.h" | 10 #include "vm/ast.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 | 256 |
257 SequenceNode* node_sequence() const { return node_sequence_; } | 257 SequenceNode* node_sequence() const { return node_sequence_; } |
258 | 258 |
259 void set_default_parameter_values(const Array& value) { | 259 void set_default_parameter_values(const Array& value) { |
260 default_parameter_values_ = value.raw(); | 260 default_parameter_values_ = value.raw(); |
261 } | 261 } |
262 | 262 |
263 // Compile test and set code in function. | 263 // Compile test and set code in function. |
264 void Compile(); | 264 void Compile(); |
265 | 265 |
| 266 LocalVariable* CreateTempConstVariable(const char* name_part); |
| 267 |
266 private: | 268 private: |
267 Function& function_; | 269 Function& function_; |
268 SequenceNode* node_sequence_; | 270 SequenceNode* node_sequence_; |
269 Array& default_parameter_values_; | 271 Array& default_parameter_values_; |
270 | 272 |
271 DISALLOW_COPY_AND_ASSIGN(CodeGenTest); | 273 DISALLOW_COPY_AND_ASSIGN(CodeGenTest); |
272 }; | 274 }; |
273 | 275 |
274 | 276 |
275 class CompilerTest : public AllStatic { | 277 class CompilerTest : public AllStatic { |
(...skipping 27 matching lines...) Expand all Loading... |
303 } else { \ | 305 } else { \ |
304 dart::Expect(__FILE__, __LINE__).Fail( \ | 306 dart::Expect(__FILE__, __LINE__).Fail( \ |
305 "expected '%s' to be an error handle but found a valid handle.\n", \ | 307 "expected '%s' to be an error handle but found a valid handle.\n", \ |
306 #handle); \ | 308 #handle); \ |
307 } \ | 309 } \ |
308 } while (0) | 310 } while (0) |
309 | 311 |
310 } // namespace dart | 312 } // namespace dart |
311 | 313 |
312 #endif // VM_UNIT_TEST_H_ | 314 #endif // VM_UNIT_TEST_H_ |
OLD | NEW |