Skip to content

Commit

Permalink
Updated Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxNode committed Sep 24, 2020
1 parent b035701 commit 2f3d5b3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions openrtb_ext/bidders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func TestBidderListDoesNotDefineContext(t *testing.T) {
// current uniqueness threshold, or else start a discussion in the PR.
func TestBidderUniquenessGatekeeping(t *testing.T) {
// Get List Of Bidders
// - Exclude duplicates of adapters for the same bidder, as it's unlikely the publisher will use both.
// - Exclude duplicates of adapters for the same bidder, as it's unlikely a publisher will use both.
var bidders []string
for _, bidder := range BidderMap {
if bidder != BidderTripleliftNative && bidder != BidderAdkernelAdn && bidder != BidderSmartadserver {
Expand All @@ -83,12 +83,12 @@ func TestBidderUniquenessGatekeeping(t *testing.T) {
currentThreshold := 6
measuredThreshold := minUniquePrefixLength(bidders)

assert.NotZero(t, measuredThreshold, "BidderMap contains duoplicate bidder name values.")
assert.NotZero(t, measuredThreshold, "BidderMap contains duplicate bidder name values.")
assert.LessOrEqual(t, measuredThreshold, currentThreshold)
}

// minUniquePrefixLength measures the minimun amount of characters needed to ensure uniqueness
// of the strings, or returns 0 if there are duplicates.
// minUniquePrefixLength measures the minimun amount of characters needed to uniquely identify
// one of the strings, or returns 0 if there are duplicates.
func minUniquePrefixLength(b []string) int {
targetingKeyMaxLength := 20
for prefixLength := 1; prefixLength <= targetingKeyMaxLength; prefixLength++ {
Expand Down

0 comments on commit 2f3d5b3

Please sign in to comment.