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
19 changes: 13 additions & 6 deletions conformance/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ _TESTS_TO_SKIP = [

# Broken test cases which should be supported.
# TODO(issues/97): Parse-only qualified variable lookup "x.y" with binding "x.y" or "y" within container "x" fails
"fields/qualified_identifier_resolution/qualified_ident,map_field_select,ident_with_longest_prefix_check,qualified_identifier_resolution_unchecked",
"namespace/qualified/self_eval_qualified_lookup",
"namespace/namespace/self_eval_container_lookup,self_eval_container_lookup_unchecked",
# NOTE: These tests have `disable_check: true` in their definition, making them force parse-only behavior even in checked mode test runs.
"fields/qualified_identifier_resolution/qualified_identifier_resolution_unchecked",
"namespace/namespace/self_eval_container_lookup_unchecked",

# Skip until fixed.
"fields/qualified_identifier_resolution/map_value_repeat_key_heterogeneous",
Expand All @@ -190,10 +190,17 @@ _TESTS_TO_SKIP = [
# precision to preserve value. Not available on older compilers where we just use absl::Format.
# We should probably update the spec to allow different formats that parse to the same value.
"conversions/string/double_hard",
]

# Recent changes
_TESTS_TO_SKIP_PARSE_ONLY = [
# TODO(issues/97): Parse-only qualified variable lookup "x.y" with binding "x.y" or "y" within container "x" fails.
"namespace/namespace_shadowing/basic",
"namespace/namespace_shadowing/comprehension_shadowing_namespaced_selector_disambiguation",
"fields/qualified_identifier_resolution/qualified_ident",
"fields/qualified_identifier_resolution/map_field_select",
"fields/qualified_identifier_resolution/ident_with_longest_prefix_check",
"namespace/qualified/self_eval_qualified_lookup",
"namespace/namespace/self_eval_container_lookup",
]

_TESTS_TO_SKIP_MODERN = _TESTS_TO_SKIP
Expand Down Expand Up @@ -238,14 +245,14 @@ gen_conformance_tests(
name = "conformance_parse_only",
data = _ALL_TESTS,
modern = True,
skip_tests = _TESTS_TO_SKIP_MODERN + ["type_deductions"],
skip_tests = _TESTS_TO_SKIP_MODERN + _TESTS_TO_SKIP_PARSE_ONLY + ["type_deductions"],
)

gen_conformance_tests(
name = "conformance_legacy_parse_only",
data = _ALL_TESTS,
modern = False,
skip_tests = _TESTS_TO_SKIP_LEGACY + ["type_deductions"],
skip_tests = _TESTS_TO_SKIP_LEGACY + _TESTS_TO_SKIP_PARSE_ONLY + ["type_deductions"],
)

gen_conformance_tests(
Expand Down
3 changes: 1 addition & 2 deletions policy/yaml_policy_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ absl::Status YamlPolicyParser::ParsePolicy(CelPolicyParseContext& ctx) const {
return absl::OkStatus();
}

// TODO(b/542282964): Fold this mapping into cel::Source decoding happens
// once.
// TODO(b/542282964): Fold this mapping into cel::Source decoding.
std::string text = source->content().ToString();
std::vector<SourcePosition> mapping;
mapping.resize(text.size() + 1, 0);
Expand Down