Add robi and quebi binary prefixes per IEC 80000-13:2025#24
Merged
gimlichael merged 5 commits intocodebeltnet:mainfrom Apr 15, 2026
Merged
Add robi and quebi binary prefixes per IEC 80000-13:2025#24gimlichael merged 5 commits intocodebeltnet:mainfrom
gimlichael merged 5 commits intocodebeltnet:mainfrom
Conversation
… fix syntax error in extensions.
…test coverage for prefix enumeration
There was a problem hiding this comment.
Pull request overview
Extends the Codebelt.Unitify binary prefix model to include the newly standardized IEC 80000-13:2025 binary prefixes robi (2^90) and quebi (2^100), and adds corresponding prefix-table lookup helpers plus test updates.
Changes:
- Added
BinaryPrefix.RobiandBinaryPrefix.Quebi, and extendedBinaryPrefix.BinaryPrefixesto include them. - Added
RobiOrDefault/QuebiOrDefaultextension methods toPrefixTableExtensions. - Updated
BinaryPrefixTestto validate new multipliers and the full prefix sequence.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Codebelt.Unitify/BinaryPrefix.cs | Adds Robi/Quebi prefixes and includes them in the exported binary prefix sequence, updating XML docs to IEC 80000-13:2025. |
| src/Codebelt.Unitify/PrefixTableExtensions.cs | Adds RobiOrDefault and QuebiOrDefault lookup helpers on PrefixTable. |
| test/Codebelt.Unitify/BinaryPrefixTest.cs | Extends tests to cover Robi/Quebi multipliers and asserts the ordered binary prefix sequence. |
Comment on lines
+335
to
+348
| public static IPrefixUnit RobiOrDefault(this PrefixTable prefixes) | ||
| { | ||
| return prefixes.SingleOrDefault(p => p.Prefix.Symbol == BinaryPrefix.Robi.Symbol); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Returns the unit with the Quebi prefix or the default value if not found. | ||
| /// </summary> | ||
| /// <param name="prefixes">The table of multiple units.</param> | ||
| /// <returns>The unit with the Quebi prefix or the default value.</returns> | ||
| public static IPrefixUnit QuebiOrDefault(this PrefixTable prefixes) | ||
| { | ||
| return prefixes.SingleOrDefault(p => p.Prefix.Symbol == BinaryPrefix.Quebi.Symbol); | ||
| } |
There was a problem hiding this comment.
The new RobiOrDefault / QuebiOrDefault extension methods are not covered by tests, while similar *OrDefault methods are exercised in existing storage tests. Adding a small focused test (e.g., a minimal PrefixTable implementation containing Robi/Quebi prefix units) would help prevent accidental breakage/regressions in these lookups.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends Unitify binary prefixes to include robi (2^90) and quebi (2^100), aligning with the latest IEC 80000-13:2025 standard.
Changes: