Pin UTF-16 string comparison in the predicate fixtures (#4106)
### Checklist - [x] If applicable, unit tests - [ ] If applicable, create follow-up issues for `purchases-ios` and hybrids ### Motivation Port of RevenueCat/purchases-ios#7518. The iOS engine compared strings with Swift's own operators, which order by Unicode scalar and read canonically equivalent spellings as equal, so relational operators, equality, `in` and `rc.entries` key ordering could evaluate differently on the two platforms. Kotlin already compares UTF-16 code units, so no behavior changes here. ### Description - 15 fixtures pinning code-unit semantics for `<`, `<=`, `>`, `>=`, `==`, `===`, `in` and `rc.entries` key order. All pass against the engine as it stands. - Fixture files stay byte-identical with `purchases-ios`; `rc_length.json` loses a description that explained the contract in Swift's terms, which never read correctly here. - The `rc.entries` doc now names UTF-16 code unit order, following the iOS wording. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Test and documentation updates only; predicate evaluation logic is unchanged on Android/Kotlin. > > **Overview** > Adds **15 shared predicate conformance fixtures** (fixture count **519 → 534**) that lock in **JavaScript-style UTF-16 code unit** behavior for string compares, equality, `in`, and `rc.entries` key ordering—aligned with the iOS port so cross-platform rules do not diverge on surrogate pairs or canonically equivalent spellings (e.g. precomposed vs decomposed é). > > **Docs-only** change: `rc.entries` KDoc now says object keys sort in **UTF-16 code unit order** instead of generic “lexicographic.” `rc_length.json` fixture copy is updated to describe the emoji length case in JS/Kotlin terms rather than Swift grapheme wording. > > **No Kotlin engine behavior change** in this PR; new fixtures pass against the existing implementation. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 3cdbb924983f2bca146d56f2413b2c94018fc2c1. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
A
Antonio Pallares committed
8a004eeb1ab3113c5afebe3e80f795888e59d8df
Parent: 8bd6e4e
Committed by GitHub <noreply@github.com>
on 8/31/2026, 8:05:29 AM