Index: test/cctest/compiler/codegen-tester.h |
diff --git a/test/cctest/compiler/codegen-tester.h b/test/cctest/compiler/codegen-tester.h |
index 42c8fcd166508d434bd34d7235e55460a2939f74..0fd3040b680931f302c1bf38c1edeff663394201 100644 |
--- a/test/cctest/compiler/codegen-tester.h |
+++ b/test/cctest/compiler/codegen-tester.h |
@@ -101,6 +101,25 @@ class RawMachineAssemblerTester |
: MachineAssemblerTester<RawMachineAssembler>( |
ReturnValueTraits<ReturnType>::Representation(), p0, p1, p2, p3, |
p4) {} |
+ |
+ template <typename Ci, typename Fn> |
+ void Run(const Ci& ci, const Fn& fn) { |
+ typename Ci::const_iterator i; |
+ for (i = ci.begin(); i != ci.end(); ++i) { |
+ CHECK_EQ(fn(*i), this->Call(*i)); |
+ } |
+ } |
+ |
+ template <typename Ci, typename Cj, typename Fn> |
+ void Run(const Ci& ci, const Cj& cj, const Fn& fn) { |
+ typename Ci::const_iterator i; |
+ typename Cj::const_iterator j; |
+ for (i = ci.begin(); i != ci.end(); ++i) { |
+ for (j = cj.begin(); j != cj.end(); ++j) { |
+ CHECK_EQ(fn(*i, *j), this->Call(*i, *j)); |
+ } |
+ } |
+ } |
}; |
@@ -163,6 +182,17 @@ class BinopTester { |
} |
} |
+ template <typename Ci, typename Cj, typename Fn> |
+ void Run(const Ci& ci, const Cj& cj, const Fn& fn) { |
+ typename Ci::const_iterator i; |
+ typename Cj::const_iterator j; |
+ for (i = ci.begin(); i != ci.end(); ++i) { |
+ for (j = cj.begin(); j != cj.end(); ++j) { |
+ CHECK_EQ(fn(*i, *j), this->call(*i, *j)); |
+ } |
+ } |
+ } |
+ |
protected: |
CType p0; |
CType p1; |