Skip to content

Commit

Permalink
Merge pull request #7 from CityTransit/raise-acceptable-delta
Browse files Browse the repository at this point in the history
Raise the acceptable delta for oneOf tests
  • Loading branch information
kedio authored Nov 17, 2021
2 parents 300d9e7 + e97dd53 commit 2d2cdb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tests/GenythingTests/gen/combine/GenOneOfTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ final internal class GenOneOfTests: XCTestCase {
let count = Gen.one(of: [gen1, gen2]).take(count: iterations).filter { $0 == 0 }.count

let expectedCount = iterations / 2 // We are expecting exactly half the values to be from bucket 0
let acceptableDelta = 1 // Allow for 1 integer difference from expectation
let acceptableDelta = 50 // Allow for the count to be +- 50
let acceptableRange = (expectedCount-acceptableDelta)...(expectedCount+acceptableDelta)

XCTAssert(acceptableRange ~= count)
Expand Down

0 comments on commit 2d2cdb8

Please sign in to comment.