Skip to content

[Good First Issue]: Rename OperatorEqual* test cases in TokenNftTransferUnitTests to follow OperatorEquals naming convention #1374

@rwalworth

Description

@rwalworth

🐥 Good First Issue

This issue is a great fit for first-time contributors looking to get familiar with the Hiero C++ SDK codebase.

Good First Issues are intentionally small and well-scoped. The change is a straightforward rename with no logic to implement — you just need to find the right lines and update the test names to match the established pattern.


👾 Description of the Task

The equality tests added to TokenNftTransferUnitTests in PR #1371 use the prefix OperatorEqualWith, but the established naming convention across the SDK uses OperatorEquals (with a trailing s).

For reference, see these existing files:

  • ExchangeRateUnitTests.cc uses OperatorEqualsDefaults, OperatorEqualsSimilar, OperatorEqualsDiff
  • TokenTransferUnitTests.cc uses OperatorEqualsSame, OperatorEqualsDiff

The six test cases added in PR #1371 need to be renamed to match this convention.

Relevant file:

src/sdk/tests/unit/TokenNftTransferUnitTests.cc

💡 Proposed Approach

Rename the six TEST_F macros in TokenNftTransferUnitTests.cc. No logic changes — only the test name strings change.


👩‍💻 Implementation Steps

  • Open src/sdk/tests/unit/TokenNftTransferUnitTests.cc

  • Apply the following exact renames:

    Current name New name
    OperatorEqualWithDefaultConstructedInstances OperatorEqualsDefaultConstructed
    OperatorEqualWithIdenticalConstructedInstances OperatorEqualsSame
    OperatorEqualWithDifferentNftId OperatorEqualsDiffNftId
    OperatorEqualWithDifferentSenderAccountId OperatorEqualsDiffSenderAccountId
    OperatorEqualWithDifferentReceiverAccountId OperatorEqualsDiffReceiverAccountId
    OperatorEqualWithDifferentIsApproval OperatorEqualsDiffIsApproval
  • Build and run the unit tests to confirm all six renamed tests still pass:

    ctest -j6 -C Debug --test-dir build/linux-x64-debug -R TokenNftTransfer
  • Open a pull request with the change


✔️ Acceptance Criteria

  • All six test cases in TokenNftTransferUnitTests.cc are renamed exactly as shown in the table above
  • No other changes are made to the file
  • All renamed tests pass

📋 Step-by-Step Contribution Guide

  • Comment /assign to request the issue
  • Wait for assignment
  • Fork the repository and create a branch
  • Set up the project using the instructions in README.md
  • Make the requested changes
  • Sign each commit using -s -S
  • Push your branch and open a pull request

Read Workflow Guide for step-by-step workflow guidance. Read README.md for setup instructions.

❗ Pull requests cannot be merged without S and s signed commits. See the Signing Guide.


🤔 Additional Information

If you have questions while working on this issue, feel free to ask! Hiero-SDK-C++ Discord

Metadata

Metadata

Assignees

Labels

kind: refactorCode changes that neither fix a bug nor add a featurepriority: lowNon-urgent tasks, nice-to-have improvements, or minor issuesskill: good first issueSimple, well-scoped tasks ideal for someone new to the repository or open source

Type

No fields configured for Task.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions