Skip to content

Conformance

Cel.NET is exercised against the cel-spec tests/simple/testdata/*.textproto corpus. Each .textproto is the granularity unit for opting into a feature: implementations that don’t support, e.g., macros, can skip macros.textproto wholesale.

Current status

TOTAL: 2082 / 2257 ran (92.25%) over 2454 cases (197 skipped)

Skipped tests fall into four buckets: feature gaps (unknowns, type_deduction, proto2_ext), spec features that conflict with this implementation’s mode choice (six enums.textproto legacy tests, see below), tests using disable_check, and tests that match against an unsupported result matcher (typed_result, any_eval_errors, any_unknowns, unknown).

Per-category breakdown

FileTotalPassFailSkipRate
basic100%
bindings_ext100%
block_ext95%
comparisons100%
conversions98%
dynamic97%
encoders_ext75%
enums100% (with 6 legacy mode-conflict skips)
fields85%
fp_math100%
integer_math100%
lists100%
logic100%
macros100%
macros287%
math_ext96%
namespace80%
network_ext100%
optionals79%
parse100%
plumbing100%
proto273%
proto2_ext0% (proto extension syntax — feature gap)
proto385%
string100%
string_ext89%
timestamps88%
type_deduction0% — feature gap
unknowns0% — feature gap
wrappers89%

Categories at 100%

basic, bindings_ext, comparisons, enums, fp_math, integer_math, lists, logic, macros, network_ext, parse, plumbing, string. Plus the enums legacy-mode-conflict skip described below.

Mode-conflicting tests

enums.textproto ships both legacy_proto*/type_* and strong_proto*/type_* sections that assert mutually exclusive behaviours: legacy expects type(EnumValue) == int, strong expects type(EnumValue) == EnumName. A single implementation can satisfy one or the other.

Cel.NET adopts strong enum semantics (matching cel-go and cel-cpp). The six conflicting legacy tests are deliberately skipped with the reason “implementation uses strong enum semantics”.

The 12 strong_proto*/* tests pass.

Categories with feature gaps

  • unknowns (0%) — partial-evaluation infrastructure. The runtime represents unknowns internally (UnknownValue); the public API for emitting them from activations is a pending feature.
  • type_deduction (0%) — the spec’s mechanism for tests to check the inferred result type. We don’t yet honour the typed_result matcher; the result-type API exists (CompiledProgram.ResultType) but the conformance harness doesn’t evaluate against it.
  • proto2_ext (0%) — proto2 message extensions (the extend block). Requires syntax support in the parser plus extension lookup in the proto type provider.

Run the harness yourself

Terminal window
dotnet run --project tests/DotnetCel.Conformance \
-- /path/to/cel-spec/tests/simple/testdata

Filter to a subset:

Terminal window
dotnet run --project tests/DotnetCel.Conformance \
-- /path/to/cel-spec/tests/simple/testdata \
--only basic comparisons enums

Set CEL_FULL_FAILURES=1 to print every failing test (the default caps at 5 per file).

What “Pass” means

A test is Pass when:

  1. The expression compiles successfully (or matches eval_error).
  2. The runtime result equals the expected value via CEL equality.

Equality goes through CelEquality.Equals so cross-numeric, NaN, list/map structural, and proto-semantic comparisons match the spec — not CLR record equality.

See also