@@ -20,7 +20,7 @@ class IterationProgressReporterTest : public ::testing::Test,
2020using CompleteLifecycleTest = IterationProgressReporterTest;
2121
2222TEST_F (CompleteLifecycleTest, NoPreprocessingOrPostprocessing) {
23- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 4 ,
23+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 4 ,
2424 /* has_preprocessing=*/ false ,
2525 /* has_postprocessing=*/ false );
2626 EXPECT_OK (reporter.IterationComplete (0 ));
@@ -31,7 +31,7 @@ TEST_F(CompleteLifecycleTest, NoPreprocessingOrPostprocessing) {
3131}
3232
3333TEST_F (CompleteLifecycleTest, NoPreprocessing) {
34- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 3 ,
34+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 3 ,
3535 /* has_preprocessing=*/ false ,
3636 /* has_postprocessing=*/ true );
3737 EXPECT_OK (reporter.IterationComplete (0 ));
@@ -42,7 +42,7 @@ TEST_F(CompleteLifecycleTest, NoPreprocessing) {
4242}
4343
4444TEST_F (CompleteLifecycleTest, NoPostprocessing) {
45- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 3 ,
45+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 3 ,
4646 /* has_preprocessing=*/ true ,
4747 /* has_postprocessing=*/ false );
4848 EXPECT_OK (reporter.PreprocessingComplete ());
@@ -53,7 +53,7 @@ TEST_F(CompleteLifecycleTest, NoPostprocessing) {
5353}
5454
5555TEST_F (CompleteLifecycleTest, WithPreprocessingAndPostprocessing) {
56- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 2 ,
56+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 2 ,
5757 /* has_preprocessing=*/ true ,
5858 /* has_postprocessing=*/ true );
5959 EXPECT_OK (reporter.PreprocessingComplete ());
@@ -68,7 +68,7 @@ TEST_F(CompleteLifecycleTest, WithPreprocessingAndPostprocessing) {
6868using CompleteLifecycleEarlyTerminationTest = IterationProgressReporterTest;
6969
7070TEST_F (CompleteLifecycleEarlyTerminationTest, NoPreprocessingOrPostprocessing) {
71- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 8 ,
71+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 8 ,
7272 /* has_preprocessing=*/ false ,
7373 /* has_postprocessing=*/ false );
7474 EXPECT_OK (reporter.IterationComplete (0 ));
@@ -80,7 +80,7 @@ TEST_F(CompleteLifecycleEarlyTerminationTest, NoPreprocessingOrPostprocessing) {
8080}
8181
8282TEST_F (CompleteLifecycleEarlyTerminationTest, NoPreprocessing) {
83- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 7 ,
83+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 7 ,
8484 /* has_preprocessing=*/ false ,
8585 /* has_postprocessing=*/ true );
8686 EXPECT_OK (reporter.IterationComplete (0 ));
@@ -94,7 +94,7 @@ TEST_F(CompleteLifecycleEarlyTerminationTest, NoPreprocessing) {
9494}
9595
9696TEST_F (CompleteLifecycleEarlyTerminationTest, NoPostprocessing) {
97- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 7 ,
97+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 7 ,
9898 /* has_preprocessing=*/ true ,
9999 /* has_postprocessing=*/ false );
100100 EXPECT_OK (reporter.PreprocessingComplete ());
@@ -107,7 +107,7 @@ TEST_F(CompleteLifecycleEarlyTerminationTest, NoPostprocessing) {
107107
108108TEST_F (CompleteLifecycleEarlyTerminationTest,
109109 WithPreprocessingAndePostprocessing) {
110- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 6 ,
110+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 6 ,
111111 /* has_preprocessing=*/ true ,
112112 /* has_postprocessing=*/ true );
113113 EXPECT_OK (reporter.PreprocessingComplete ());
@@ -125,15 +125,15 @@ TEST_F(CompleteLifecycleEarlyTerminationTest,
125125using CompleteLifecycleDoneImmediatelyTest = IterationProgressReporterTest;
126126
127127TEST_F (CompleteLifecycleDoneImmediatelyTest, NoPreprocessingOrPostprocessing) {
128- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 8 ,
128+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 8 ,
129129 /* has_preprocessing=*/ false ,
130130 /* has_postprocessing=*/ false );
131131 EXPECT_OK (reporter.IterationsDoneEarly ());
132132 EXPECT_THAT (GetProgressReports (), ElementsAre (1.0 ));
133133}
134134
135135TEST_F (CompleteLifecycleDoneImmediatelyTest, NoPreprocessing) {
136- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 7 ,
136+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 7 ,
137137 /* has_preprocessing=*/ false ,
138138 /* has_postprocessing=*/ true );
139139 EXPECT_OK (reporter.IterationsDoneEarly ());
@@ -142,7 +142,7 @@ TEST_F(CompleteLifecycleDoneImmediatelyTest, NoPreprocessing) {
142142}
143143
144144TEST_F (CompleteLifecycleDoneImmediatelyTest, NoPostprocessing) {
145- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 7 ,
145+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 7 ,
146146 /* has_preprocessing=*/ true ,
147147 /* has_postprocessing=*/ false );
148148 EXPECT_OK (reporter.PreprocessingComplete ());
@@ -152,7 +152,7 @@ TEST_F(CompleteLifecycleDoneImmediatelyTest, NoPostprocessing) {
152152
153153TEST_F (CompleteLifecycleDoneImmediatelyTest,
154154 WithPreprocessingAndPostprocessing) {
155- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 6 ,
155+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 6 ,
156156 /* has_preprocessing=*/ true ,
157157 /* has_postprocessing=*/ true );
158158 EXPECT_OK (reporter.PreprocessingComplete ());
@@ -168,7 +168,7 @@ using IterationsDoneEarlyTest = IterationProgressReporterTest;
168168using PostprocessingCompleteTest = IterationProgressReporterTest;
169169
170170TEST_F (ProcessCompleteTest, Disallowed) {
171- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 1 ,
171+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 1 ,
172172 /* has_preprocessing=*/ false );
173173 EXPECT_THAT (reporter.PreprocessingComplete (),
174174 StatusIs (absl::StatusCode::kFailedPrecondition ,
@@ -177,7 +177,7 @@ TEST_F(ProcessCompleteTest, Disallowed) {
177177}
178178
179179TEST_F (ProcessCompleteTest, CalledMultipleTimes) {
180- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 1 ,
180+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 1 ,
181181 /* has_preprocessing=*/ true );
182182 EXPECT_OK (reporter.PreprocessingComplete ());
183183 EXPECT_THAT (reporter.PreprocessingComplete (),
@@ -186,7 +186,7 @@ TEST_F(ProcessCompleteTest, CalledMultipleTimes) {
186186}
187187
188188TEST_F (IterationCompleteTest, PreprocessingCompleteNotCalled) {
189- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 1 ,
189+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 1 ,
190190 /* has_preprocessing=*/ true );
191191 EXPECT_THAT (
192192 reporter.IterationComplete (0 ),
@@ -196,7 +196,7 @@ TEST_F(IterationCompleteTest, PreprocessingCompleteNotCalled) {
196196}
197197
198198TEST_F (IterationCompleteTest, NegativeNumIterations) {
199- IterationProgressReporter reporter (MockReportProgress (),
199+ IterationProgressReporter reporter (MockReportProgressCallback (),
200200 /* num_iterations=*/ -1 ,
201201 /* has_preprocessing=*/ false );
202202 EXPECT_THAT (
@@ -206,7 +206,7 @@ TEST_F(IterationCompleteTest, NegativeNumIterations) {
206206}
207207
208208TEST_F (IterationCompleteTest, ZeroNumIterations) {
209- IterationProgressReporter reporter (MockReportProgress (),
209+ IterationProgressReporter reporter (MockReportProgressCallback (),
210210 /* num_iterations=*/ 0 ,
211211 /* has_preprocessing=*/ false );
212212 EXPECT_THAT (
@@ -216,7 +216,7 @@ TEST_F(IterationCompleteTest, ZeroNumIterations) {
216216}
217217
218218TEST_F (IterationCompleteTest, IterationTooSmall) {
219- IterationProgressReporter reporter (MockReportProgress (),
219+ IterationProgressReporter reporter (MockReportProgressCallback (),
220220 /* num_iterations=*/ 1 ,
221221 /* has_preprocessing=*/ false );
222222 EXPECT_THAT (reporter.IterationComplete (-1 ),
@@ -226,7 +226,7 @@ TEST_F(IterationCompleteTest, IterationTooSmall) {
226226}
227227
228228TEST_F (IterationCompleteTest, IterationTooLarge) {
229- IterationProgressReporter reporter (MockReportProgress (),
229+ IterationProgressReporter reporter (MockReportProgressCallback (),
230230 /* num_iterations=*/ 2 ,
231231 /* has_preprocessing=*/ false );
232232 EXPECT_OK (reporter.IterationComplete (0 ));
@@ -239,7 +239,7 @@ TEST_F(IterationCompleteTest, IterationTooLarge) {
239239}
240240
241241TEST_F (IterationCompleteTest, InvalidIterationValueNoPreprocessing) {
242- IterationProgressReporter reporter (MockReportProgress (),
242+ IterationProgressReporter reporter (MockReportProgressCallback (),
243243 /* num_iterations=*/ 5 ,
244244 /* has_preprocessing=*/ false );
245245 EXPECT_OK (reporter.IterationComplete (0 ));
@@ -251,7 +251,7 @@ TEST_F(IterationCompleteTest, InvalidIterationValueNoPreprocessing) {
251251}
252252
253253TEST_F (IterationCompleteTest, InvalidIterationValueWithPreprocessing) {
254- IterationProgressReporter reporter (MockReportProgress (),
254+ IterationProgressReporter reporter (MockReportProgressCallback (),
255255 /* num_iterations=*/ 5 ,
256256 /* has_preprocessing=*/ true );
257257 EXPECT_OK (reporter.PreprocessingComplete ());
@@ -264,7 +264,7 @@ TEST_F(IterationCompleteTest, InvalidIterationValueWithPreprocessing) {
264264}
265265
266266TEST_F (IterationsDoneEarlyTest, NegativeNumIterations) {
267- IterationProgressReporter reporter (MockReportProgress (),
267+ IterationProgressReporter reporter (MockReportProgressCallback (),
268268 /* num_iterations=*/ -1 ,
269269 /* has_preprocessing=*/ false );
270270 EXPECT_THAT (
@@ -274,7 +274,7 @@ TEST_F(IterationsDoneEarlyTest, NegativeNumIterations) {
274274}
275275
276276TEST_F (IterationsDoneEarlyTest, ZeroNumIterations) {
277- IterationProgressReporter reporter (MockReportProgress (),
277+ IterationProgressReporter reporter (MockReportProgressCallback (),
278278 /* num_iterations=*/ 0 ,
279279 /* has_preprocessing=*/ false );
280280 EXPECT_THAT (
@@ -284,7 +284,7 @@ TEST_F(IterationsDoneEarlyTest, ZeroNumIterations) {
284284}
285285
286286TEST_F (IterationsDoneEarlyTest, PreprocessingCompleteNotCalled) {
287- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 1 ,
287+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 1 ,
288288 /* has_preprocessing=*/ true );
289289 EXPECT_THAT (
290290 reporter.IterationsDoneEarly (),
@@ -294,7 +294,7 @@ TEST_F(IterationsDoneEarlyTest, PreprocessingCompleteNotCalled) {
294294}
295295
296296TEST_F (PostprocessingCompleteTest, Disallowed) {
297- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 1 ,
297+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 1 ,
298298 /* has_preprocessing=*/ false ,
299299 /* has_postprocessing=*/ false );
300300 EXPECT_OK (reporter.IterationComplete (0 ));
@@ -305,7 +305,7 @@ TEST_F(PostprocessingCompleteTest, Disallowed) {
305305}
306306
307307TEST_F (PostprocessingCompleteTest, CalledTooEarlyNoPreprocessing) {
308- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 1 ,
308+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 1 ,
309309 /* has_preprocessing=*/ false ,
310310 /* has_postprocessing=*/ true );
311311 EXPECT_THAT (reporter.PostprocessingComplete (),
@@ -315,7 +315,7 @@ TEST_F(PostprocessingCompleteTest, CalledTooEarlyNoPreprocessing) {
315315}
316316
317317TEST_F (PostprocessingCompleteTest, CalledTooEarlyWithPreprocessing) {
318- IterationProgressReporter reporter (MockReportProgress (), /* num_iterations=*/ 1 ,
318+ IterationProgressReporter reporter (MockReportProgressCallback (), /* num_iterations=*/ 1 ,
319319 /* has_preprocessing=*/ true ,
320320 /* has_postprocessing=*/ true );
321321 EXPECT_OK (reporter.PreprocessingComplete ());
0 commit comments