6 #include <gtest/gtest.h>
12 TEST(ThreeAddressCodeTests, ToAscii)
30 TestOperation::create({ valueType, valueType }, { valueType, valueType }),
35 std::cout << tac0String <<
"\n" << std::flush;
38 std::cout << tac1String <<
"\n" << std::flush;
41 std::cout << tac2String <<
"\n" << std::flush;
44 std::cout << tac3String <<
"\n" << std::flush;
47 std::cout << tac4String <<
"\n" << std::flush;
50 std::cout << tac5String <<
"\n" << std::flush;
53 EXPECT_EQ(tac0String,
"TestOperation");
54 EXPECT_EQ(tac1String,
"TestOperation v0");
55 EXPECT_EQ(tac2String,
"TestOperation v0, v1");
TEST(ThreeAddressCodeTests, ToAscii)
static std::unique_ptr< llvm::ThreeAddressCode > create(std::unique_ptr< rvsdg::SimpleOperation > operation, const std::vector< const Variable * > &operands)
static std::string ToAscii(const ThreeAddressCode &threeAddressCode)
static std::shared_ptr< const TestType > createValueType()
Global memory state passed between functions.