Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions env/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class Env {

void SetConfig(const Config& config) { config_ = config; }

CompilerOptions& GetCompilerOptions() { return compiler_options_; }

absl::StatusOr<std::unique_ptr<CompilerBuilder>> NewCompilerBuilder();

// Shortcut for NewCompilerBuilder() followed by Build().
Expand Down
11 changes: 11 additions & 0 deletions env/env_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -662,5 +662,16 @@ std::vector<FunctionConfigTestCase> GetFunctionConfigTestCases() {
INSTANTIATE_TEST_SUITE_P(FunctionConfigTest, FunctionConfigTest,
::testing::ValuesIn(GetFunctionConfigTestCases()));

TEST(EnvTest, GetCompilerOptions) {
Env env;
EXPECT_TRUE(
env.GetCompilerOptions().parser_options.enable_quoted_identifiers);
EXPECT_TRUE(env.GetCompilerOptions().adapt_parser_errors);

env.GetCompilerOptions().parser_options.enable_quoted_identifiers = false;
EXPECT_FALSE(
env.GetCompilerOptions().parser_options.enable_quoted_identifiers);
}

} // namespace
} // namespace cel
Loading