// Performs one peephole test. Applies peephole optimizations to the given // source instruction stream, and checks that it equals the expected result void test_1(const std::string& name, const IRInstructionList& src, const IRInstructionList& expected) { DexMethod* method = make_void_method(name.c_str(), src); dex_class->add_method(method); manager.run_passes(stores, config); IRInstructionList result(method->get_code()); EXPECT_EQ(result, expected) << " for test " << name; dex_class->remove_method(method); }