| 108 | }; |
| 109 | |
| 110 | TEST_F(TestEngine, TestAddUnoptimised) { |
| 111 | configuration->set_optimize(false); |
| 112 | BuildEngine(); |
| 113 | |
| 114 | std::string fn_name = BuildVecAdd(engine.get()); |
| 115 | ASSERT_OK(engine->FinalizeModule()); |
| 116 | ASSERT_OK_AND_ASSIGN(auto fn_ptr, engine->CompiledFunction(fn_name)); |
| 117 | auto add_func = reinterpret_cast<add_vector_func_t>(fn_ptr); |
| 118 | |
| 119 | int64_t my_array[] = {1, 3, -5, 8, 10}; |
| 120 | EXPECT_EQ(add_func(my_array, 5), 17); |
| 121 | } |
| 122 | |
| 123 | TEST_F(TestEngine, TestAddOptimised) { |
| 124 | configuration->set_optimize(true); |
nothing calls this directly
no test coverage detected