Skip to content

Add ORIGIN and LOCALE to Currency trait, add tests for minor_unit_name, origin, locale#11

Merged
mfirhas merged 4 commits into
masterfrom
copilot/add-origin-locale-attributes
May 7, 2026
Merged

Add ORIGIN and LOCALE to Currency trait, add tests for minor_unit_name, origin, locale#11
mfirhas merged 4 commits into
masterfrom
copilot/add-origin-locale-attributes

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 7, 2026

Summary

Adds the two remaining Data struct attributes (origin and locale) to the Currency trait, and adds tests for minor_unit_name, origin, and locale.

Changes

  • src/lib.rs: Added ORIGIN and LOCALE constants to the Currency trait with doc comments.
  • build.rs: Updated the code generator to emit ORIGIN and LOCALE in each currency's impl Currency block.
  • src/iso_currencies_test.rs: Extended each existing per-currency test function with three additional assertions:
    • MINOR_UNIT_NAME — verifies the minor unit name for the currency
    • ORIGIN — verifies the country/region of origin
    • LOCALE — verifies the BCP 47 locale tag

All 183 tests pass.

…, origin, locale

Agent-Logs-Url: https://github.com/mfirhas/currencylib/sessions/beb67adc-e2fd-4765-a591-2cb12c19a8b1

Co-authored-by: mfirhas <11944811+mfirhas@users.noreply.github.com>
Comment thread src/iso_currencies_test.rs
…ncy test functions

Agent-Logs-Url: https://github.com/mfirhas/currencylib/sessions/7c6cc16a-ce38-4653-b3e1-1df64e98e00b

Co-authored-by: mfirhas <11944811+mfirhas@users.noreply.github.com>
Copilot finished work on behalf of mfirhas May 7, 2026 10:31
Copilot AI requested a review from mfirhas May 7, 2026 10:31
Comment thread src/iso_currencies_test.rs Outdated
Comment thread src/lib.rs
…ith MINOR_UNIT_NAME, ORIGIN, LOCALE

Agent-Logs-Url: https://github.com/mfirhas/currencylib/sessions/646315e8-4dcd-48fc-bd71-ece13e55f1b2

Co-authored-by: mfirhas <11944811+mfirhas@users.noreply.github.com>
Copilot finished work on behalf of mfirhas May 7, 2026 10:42
Copilot AI requested a review from mfirhas May 7, 2026 10:42
@mfirhas mfirhas marked this pull request as ready for review May 7, 2026 10:44
@mfirhas
Copy link
Copy Markdown
Owner

mfirhas commented May 7, 2026

@copilot edit Makefile on lcov command, move clean before mkdir

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 7, 2026

@copilot edit Makefile on lcov command, move clean before mkdir

Done in e9e2c97. cargo clean now runs before mkdir -p $(OUT_DIR) in the lcov target.

Copilot AI requested a review from mfirhas May 7, 2026 10:51
Copilot finished work on behalf of mfirhas May 7, 2026 10:51
@mfirhas mfirhas merged commit 39e28a6 into master May 7, 2026
5 of 6 checks passed
@mfirhas mfirhas deleted the copilot/add-origin-locale-attributes branch May 7, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants