Skip to content

Commit 511406a

Browse files
committed
Fix tests that were constructing TrialEstimate
1 parent d6e40ad commit 511406a

File tree

2 files changed

+29
-13
lines changed

2 files changed

+29
-13
lines changed

test/GroupsTests.jl

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@ seteq(a, b) = length(a) == length(b) == length(intersect(a, b))
1515

1616
g1 = BenchmarkGroup(["1", "2"])
1717

18-
t1a = TrialEstimate(Parameters(; time_tolerance=0.05, memory_tolerance=0.05), 32, 1, 2, 3)
18+
t1a = TrialEstimate(
19+
Parameters(; time_tolerance=0.05, memory_tolerance=0.05), 32, 1, 2, 3, nothing
20+
)
1921
t1b = TrialEstimate(
20-
Parameters(; time_tolerance=0.40, memory_tolerance=0.40), 4123, 123, 43, 9
22+
Parameters(; time_tolerance=0.40, memory_tolerance=0.40), 4123, 123, 43, 9, nothing
23+
)
24+
tc = TrialEstimate(
25+
Parameters(; time_tolerance=1.0, memory_tolerance=1.0), 1, 1, 1, 1, nothing
2126
)
22-
tc = TrialEstimate(Parameters(; time_tolerance=1.0, memory_tolerance=1.0), 1, 1, 1, 1)
2327

2428
g1["a"] = t1a
2529
g1["b"] = t1b
@@ -30,9 +34,11 @@ g1similar = similar(g1)
3034

3135
g2 = BenchmarkGroup(["2", "3"])
3236

33-
t2a = TrialEstimate(Parameters(; time_tolerance=0.05, memory_tolerance=0.05), 323, 1, 2, 3)
37+
t2a = TrialEstimate(
38+
Parameters(; time_tolerance=0.05, memory_tolerance=0.05), 323, 1, 2, 3, nothing
39+
)
3440
t2b = TrialEstimate(
35-
Parameters(; time_tolerance=0.40, memory_tolerance=0.40), 1002, 123, 43, 9
41+
Parameters(; time_tolerance=0.40, memory_tolerance=0.40), 1002, 123, 43, 9, nothing
3642
)
3743

3844
g2["a"] = t2a
@@ -151,10 +157,10 @@ groupsa["g1"] = g1
151157
groupsa["g2"] = g2
152158
g3a = addgroup!(groupsa, "g3", ["3", "4"])
153159
g3a["c"] = TrialEstimate(
154-
Parameters(; time_tolerance=0.05, memory_tolerance=0.05), 6341, 23, 41, 536
160+
Parameters(; time_tolerance=0.05, memory_tolerance=0.05), 6341, 23, 41, 536, nothing
155161
)
156162
g3a["d"] = TrialEstimate(
157-
Parameters(; time_tolerance=0.13, memory_tolerance=0.13), 12341, 3013, 2, 150
163+
Parameters(; time_tolerance=0.13, memory_tolerance=0.13), 12341, 3013, 2, 150, nothing
158164
)
159165

160166
groups_copy = copy(groupsa)
@@ -165,10 +171,10 @@ groupsb["g1"] = g1
165171
groupsb["g2"] = g2
166172
g3b = addgroup!(groupsb, "g3", ["3", "4"])
167173
g3b["c"] = TrialEstimate(
168-
Parameters(; time_tolerance=0.05, memory_tolerance=0.05), 1003, 23, 41, 536
174+
Parameters(; time_tolerance=0.05, memory_tolerance=0.05), 1003, 23, 41, 536, nothing
169175
)
170176
g3b["d"] = TrialEstimate(
171-
Parameters(; time_tolerance=0.23, memory_tolerance=0.23), 25341, 3013, 2, 150
177+
Parameters(; time_tolerance=0.23, memory_tolerance=0.23), 25341, 3013, 2, 150, nothing
172178
)
173179

174180
groupstrial = BenchmarkGroup()

test/TrialsTests.jl

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ x, y = rand(randrange), rand(randrange)
119119
@test ratio(0.0, 0.0) == 1.0
120120

121121
ta = BenchmarkTools.TrialEstimate(
122-
BenchmarkTools.Parameters(), rand(), rand(), rand(Int), rand(Int)
122+
BenchmarkTools.Parameters(), rand(), rand(), rand(Int), rand(Int), nothing
123123
)
124124
tb = BenchmarkTools.TrialEstimate(
125-
BenchmarkTools.Parameters(), rand(), rand(), rand(Int), rand(Int)
125+
BenchmarkTools.Parameters(), rand(), rand(), rand(Int), rand(Int), nothing
126126
)
127127
tr = ratio(ta, tb)
128128

@@ -140,10 +140,20 @@ tr = ratio(ta, tb)
140140
##################
141141

142142
ta = BenchmarkTools.TrialEstimate(
143-
BenchmarkTools.Parameters(; time_tolerance=0.50, memory_tolerance=0.50), 0.49, 0.0, 2, 1
143+
BenchmarkTools.Parameters(; time_tolerance=0.50, memory_tolerance=0.50),
144+
0.49,
145+
0.0,
146+
2,
147+
1,
148+
nothing,
144149
)
145150
tb = BenchmarkTools.TrialEstimate(
146-
BenchmarkTools.Parameters(; time_tolerance=0.05, memory_tolerance=0.05), 1.00, 0.0, 1, 1
151+
BenchmarkTools.Parameters(; time_tolerance=0.05, memory_tolerance=0.05),
152+
1.00,
153+
0.0,
154+
1,
155+
1,
156+
nothing,
147157
)
148158
tr = ratio(ta, tb)
149159
tj_ab = judge(ta, tb)

0 commit comments

Comments
 (0)