MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / GetExportTestCases

Function GetExportTestCases

env/env_yaml_test.cc:922–1343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

920}
921
922std::vector<ExportTestCase> GetExportTestCases() {
923 return {
924 ExportTestCase{
925 .config =
926 []() {
927 Config config;
928 config.SetName("test.env");
929 config.SetContainerConfig({.name = "test.container"});
930 return config;
931 }(),
932 .expected_yaml = R"yaml(
933 name: "test.env"
934 container: "test.container"
935 )yaml",
936 },
937 ExportTestCase{
938 .config = []() -> absl::StatusOr<Config> {
939 Config config;
940 config.SetName("test.env");
941 config.SetContainerConfig({.name = "test.container"});
942 return config;
943 }(),
944 .expected_yaml = R"yaml(
945 name: "test.env"
946 container: "test.container"
947 )yaml",
948 },
949 ExportTestCase{
950 .config = []() -> absl::StatusOr<Config> {
951 Config config;
952 CEL_RETURN_IF_ERROR(config.AddExtensionConfig("math"));
953 CEL_RETURN_IF_ERROR(config.AddExtensionConfig("optional", 2));
954 CEL_RETURN_IF_ERROR(config.AddExtensionConfig("bindings"));
955 return config;
956 }(),
957 .expected_yaml = R"yaml(
958 extensions:
959 - name: "bindings"
960 - name: "math"
961 - name: "optional"
962 version: 2
963 )yaml",
964 },
965 ExportTestCase{
966 .config = []() -> absl::StatusOr<Config> {
967 Config config;
968 CEL_RETURN_IF_ERROR(
969 config.SetStandardLibraryConfig(Config::StandardLibraryConfig{
970 .disable = true,
971 }));
972 return config;
973 }(),
974 .expected_yaml = R"yaml(
975 stdlib:
976 disable: true
977 )yaml",
978 },
979 ExportTestCase{

Callers 1

TESTFunction · 0.85

Calls 9

ConstantClass · 0.85
BytesConstantClass · 0.85
StringConstantClass · 0.85
SetNameMethod · 0.80
SetContainerConfigMethod · 0.80
AddExtensionConfigMethod · 0.80
AddVariableConfigMethod · 0.80
AddFunctionConfigMethod · 0.80

Tested by

no test coverage detected