Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid using unexported constants in tests #485

Open
wants to merge 5 commits into
base: fxamacker/avoid-accessing-SlabID-fields-in-tests
Choose a base branch
from

Conversation

fxamacker
Copy link
Member

@fxamacker fxamacker commented Jan 24, 2025

Updates #464

This PR avoids using these unexported constants in tests:

  • minInternalCBORTagNumber
  • maxInternalCBORTagNumber
  • maxInlineArrayElementSize
  • maxInlineMapElementSize
  • maxInlineMapKeySize
  • targetThreshold

  • Targeted PR against main branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

This commit avoids using these unexported constants in tests:
- minInternalCBORTagNumber
- maxInternalCBORTagNumber
@fxamacker fxamacker self-assigned this Jan 24, 2025
@fxamacker fxamacker requested a review from turbolent as a code owner January 24, 2025 17:03
This commit avoids using maxInlineArrayElementSize in tests.
This commit avoids using maxInlineMapKeySize in tests.
This commit adds new function MaxInlineMapElementSize() and
modifies tests to use the new function instead of unexported
constants maxInlineMapElementSize.
This commit:
- adds new function targetSlabSize() in settings.go
- exports targetSlabSize() to TargetSlabSize() in export_test.go
  for testing
- modifies tests to use exported function instead of unexported
constants targetThreshold.
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