| 38 | class EnvStdExtensions : public testing::TestWithParam<TestCase> {}; |
| 39 | |
| 40 | TEST_P(EnvStdExtensions, RegistrationTest) { |
| 41 | const TestCase& param = GetParam(); |
| 42 | |
| 43 | Env env; |
| 44 | RegisterStandardExtensions(env); |
| 45 | env.SetDescriptorPool(internal::GetSharedTestingDescriptorPool()); |
| 46 | |
| 47 | Config config; |
| 48 | ASSERT_THAT(config.AddExtensionConfig(param.extension), IsOk()); |
| 49 | env.SetConfig(config); |
| 50 | |
| 51 | ASSERT_OK_AND_ASSIGN(std::unique_ptr<Compiler> compiler, env.NewCompiler()); |
| 52 | |
| 53 | ASSERT_OK_AND_ASSIGN(auto result, compiler->Compile(param.expr)); |
| 54 | ASSERT_TRUE(result.IsValid()) << "Expected no issues for expr: " << param.expr |
| 55 | << " but got: " << result.FormatError(); |
| 56 | } |
| 57 | |
| 58 | INSTANTIATE_TEST_SUITE_P( |
| 59 | RegistrationTest, EnvStdExtensions, |
nothing calls this directly
no test coverage detected