Skip to content

Fix normalized hash test in case of collisions. - #2870

Open
toinehartman wants to merge 1 commit into
mainfrom
fix/normalized-hash-collision
Open

Fix normalized hash test in case of collisions.#2870
toinehartman wants to merge 1 commit into
mainfrom
fix/normalized-hash-collision

Conversation

@toinehartman

@toinehartman toinehartman commented Aug 26, 2026

Copy link
Copy Markdown
Member

Allow normalized hash collisions in tests in case there would be a hash collision for the input strings anyway.

Example failure:
https://github.com/usethesource/rascal/actions/runs/32944398075/job/98103370299

rascal>import IO;
ok
rascal>str1 = "𠙹𠟒𒇇𠢆𒑡𡓅𒌓";
str: "��������������"
───
𠙹𠟒𒇇𠢆𒑡𡓅𒌓
───

rascal>str2 = "𠌰𒄇𒑃𒎔𒉱𠤿𠙨";
str: "��������������"
───
𠌰𒄇𒑃𒎔𒉱𠤿𠙨
───

rascal>md5Hash(str1) == md5Hash(str2);
bool: true

Fixes test added in:

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46%. Comparing base (16abf95) to head (197225b).

Additional details and impacted files
@@           Coverage Diff           @@
##              main   #2870   +/-   ##
=======================================
- Coverage       46%     46%   -1%     
+ Complexity    6776    6768    -8     
=======================================
  Files          844     844           
  Lines        67103   67103           
  Branches     10022   10022           
=======================================
- Hits         30903   30884   -19     
- Misses       33828   33842   +14     
- Partials      2372    2377    +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant