Migrate to '_test' package idiom #273

Open
jdimaria wants to merge 2 commits from jdimaria/test-package into master
jdimaria commented 2024-12-03 21:32:57 +00:00 (Migrated from github.com)

Resolves https://github.com/emirpasic/gods/issues/272, simple adoption of the _test package to enforce testing strictly against the public data structure APIs

Previous tests have been confirmed to still pass with updated imports

Only test that needed additional updates was inside btree_test.go, which was the only test that broke convention by testing unexported fields beyond simple reads (see TestBTreeSearch())

The intended test behavior has been replicated as closely as possible using exported methods

Resolves https://github.com/emirpasic/gods/issues/272, simple adoption of the `_test` package to enforce testing strictly against the public data structure APIs Previous tests have been confirmed to still pass with updated imports Only test that needed additional updates was inside `btree_test.go`, which was the only test that broke convention by testing unexported fields beyond simple reads (see `TestBTreeSearch()`) The intended test behavior has been replicated as closely as possible using exported methods
sonarqubecloud[bot] commented 2024-12-03 21:33:14 +00:00 (Migrated from github.com)
## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=gods&pullRequest=273) **Quality Gate passed** Issues ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=gods&pullRequest=273&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true) ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=gods&pullRequest=273&issueStatuses=ACCEPTED) Measures ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=gods&pullRequest=273&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true) ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=gods&pullRequest=273&metric=new_coverage&view=list) ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=gods&pullRequest=273&metric=new_duplicated_lines_density&view=list) [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=gods&pullRequest=273)
This pull request has changes conflicting with the target branch.
  • maps/hashbidimap/hashbidimap_test.go
  • maps/hashmap/hashmap_test.go
  • maps/linkedhashmap/linkedhashmap_test.go
  • maps/treebidimap/treebidimap_test.go
  • maps/treemap/treemap_test.go
  • queues/arrayqueue/arrayqueue_test.go
  • queues/circularbuffer/circularbuffer_test.go
  • queues/linkedlistqueue/linkedlistqueue_test.go
  • queues/priorityqueue/priorityqueue_test.go
  • sets/hashset/hashset_test.go
  • sets/linkedhashset/linkedhashset_test.go
  • sets/treeset/treeset_test.go
  • stacks/arraystack/arraystack_test.go
  • stacks/linkedliststack/linkedliststack_test.go
  • trees/binaryheap/binaryheap_test.go
  • trees/btree/btree_test.go
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin "jdimaria/test-package:jdimaria/test-package"
git switch "jdimaria/test-package"

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch "master"
git merge --no-ff "jdimaria/test-package"
git switch "jdimaria/test-package"
git rebase "master"
git switch "master"
git merge --ff-only "jdimaria/test-package"
git switch "jdimaria/test-package"
git rebase "master"
git switch "master"
git merge --no-ff "jdimaria/test-package"
git switch "master"
git merge --squash "jdimaria/test-package"
git switch "master"
git merge --ff-only "jdimaria/test-package"
git switch "master"
git merge "jdimaria/test-package"
git push origin "master"
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
golibs/gms-gods!273
No description provided.