Skip to content

test(price-guard): test SortBuf sorting, duplicates, negatives, and 8-element cap (#113) - #1134

Closed
jeffrey-graham wants to merge 1 commit into
DevTobis:mainfrom
jeffrey-graham:test/issue-113-sortbuf-unit-tests
Closed

jeffrey-graham wants to merge 1 commit into
DevTobis:mainfrom
jeffrey-graham:test/issue-113-sortbuf-unit-tests

Conversation

@jeffrey-graham

Copy link
Copy Markdown

Closes #113

Summary

  • Adds direct unit tests for alloc_free_sort::SortBuf in contracts/price-guard/src/lib.rs covering unsorted input ([3, 1, 2]), already sorted input ([1, 2, 3]), duplicate elements ([5, 5, 5]), negative values ([-10, 5, -3]), the full 8-element capacity ([8..=1]), and the 9-element panic ("more than 8 fresh sources").

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.

Test SortBuf: sorting, duplicates and the 8-element capacity limit

1 participant