Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit aa0ec10

Browse files
committed
Remove prints
1 parent 498ffd8 commit aa0ec10

File tree

3 files changed

+7
-31
lines changed

3 files changed

+7
-31
lines changed

shell/platform/embedder/tests/embedder_metal_unittests.mm

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ GrBackendTexture backend_texture(texture_size.width(), texture_size.height(), Gr
108108
builder.SetMetalRendererConfig(texture_size);
109109

110110
auto engine = builder.LaunchEngine();
111-
EXPECT_TRUE(engine.is_valid());
111+
ASSERT_TRUE(engine.is_valid());
112112

113-
EXPECT_EQ(FlutterEngineRegisterExternalTexture(engine.get(), texture_id), kSuccess);
113+
ASSERT_EQ(FlutterEngineRegisterExternalTexture(engine.get(), texture_id), kSuccess);
114114

115115
auto rendered_scene = context.GetNextSceneImage();
116116

@@ -120,9 +120,9 @@ GrBackendTexture backend_texture(texture_size.width(), texture_size.height(), Gr
120120
event.width = texture_size.width();
121121
event.height = texture_size.height();
122122
event.pixel_ratio = 1.0;
123-
EXPECT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event), kSuccess);
123+
ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event), kSuccess);
124124

125-
EXPECT_TRUE(ImageMatchesFixture("external_texture_metal.png", rendered_scene));
125+
ASSERT_TRUE(ImageMatchesFixture("external_texture_metal.png", rendered_scene));
126126
}
127127

128128
TEST_F(EmbedderTest, MetalCompositorMustBeAbleToRenderPlatformViews) {
@@ -218,26 +218,18 @@ GrBackendTexture backend_texture(texture_size.width(), texture_size.height(), Gr
218218

219219
auto rendered_scene = context.GetNextSceneImage();
220220

221-
printf("main 1\n");
222-
fflush(stdout);
223221
auto engine = builder.LaunchEngine();
224-
EXPECT_TRUE(engine.is_valid());
225-
printf("main 2\n");
226-
fflush(stdout);
222+
ASSERT_TRUE(engine.is_valid());
227223

228224
// Send a window metrics events so frames may be scheduled.
229225
FlutterWindowMetricsEvent event = {};
230226
event.struct_size = sizeof(event);
231227
event.width = 800;
232228
event.height = 600;
233229
event.pixel_ratio = 1.0;
234-
EXPECT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event), kSuccess);
235-
printf("main 3\n");
236-
fflush(stdout);
230+
ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event), kSuccess);
237231

238-
EXPECT_TRUE(ImageMatchesFixture("scene_without_custom_compositor.png", rendered_scene));
239-
printf("main 4\n");
240-
fflush(stdout);
232+
ASSERT_TRUE(ImageMatchesFixture("scene_without_custom_compositor.png", rendered_scene));
241233
}
242234

243235
TEST_F(EmbedderTest, TextureDestructionCallbackCalledWithoutCustomCompositorMetal) {

shell/platform/embedder/tests/embedder_test_context.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,6 @@ std::future<sk_sp<SkImage>> EmbedderTestContext::GetNextSceneImage() {
257257
auto future = promise.get_future();
258258
SetNextSceneCallback(
259259
fml::MakeCopyable([promise = std::move(promise)](auto image) mutable {
260-
printf("Assign GetNextSceneImage\n");
261-
fflush(stdout);
262260
promise.set_value(image);
263261
}));
264262
return future;

shell/platform/embedder/tests/embedder_unittests_util.cc

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,7 @@ bool WriteImageToDisk(const fml::UniqueFD& directory,
151151

152152
bool ImageMatchesFixture(const std::string& fixture_file_name,
153153
const sk_sp<SkImage>& scene_image) {
154-
printf("ImageMatchesFixture sync\n");
155-
fflush(stdout);
156154
fml::FileMapping fixture_image_mapping(OpenFixture(fixture_file_name));
157-
printf("ImageMatchesFixture sync 1\n");
158-
fflush(stdout);
159155

160156
FML_CHECK(fixture_image_mapping.GetSize() != 0u)
161157
<< "Could not find fixture: " << fixture_file_name;
@@ -166,8 +162,6 @@ bool ImageMatchesFixture(const std::string& fixture_file_name,
166162
SkImages::DeferredFromEncodedData(std::move(encoded_image))
167163
->makeRasterImage();
168164

169-
printf("ImageMatchesFixture 1\n");
170-
fflush(stdout);
171165
FML_CHECK(fixture_image) << "Could not create image from fixture: "
172166
<< fixture_file_name;
173167

@@ -181,19 +175,13 @@ bool ImageMatchesFixture(const std::string& fixture_file_name,
181175
<< "Could not create image subset for fixture comparison: "
182176
<< scene_image_subset;
183177

184-
printf("ImageMatchesFixture 2\n");
185-
fflush(stdout);
186178
const auto images_are_same =
187179
RasterImagesAreSame(scene_image_subset, fixture_image);
188-
printf("ImageMatchesFixture 3\n");
189-
fflush(stdout);
190180

191181
// If the images are not the same, this predicate is going to indicate test
192182
// failure. Dump both the actual image and the expectation to disk to the
193183
// test author can figure out what went wrong.
194184
if (!images_are_same) {
195-
printf("ImageMatchesFixture diff\n");
196-
fflush(stdout);
197185
const auto fixtures_path = GetFixturesPath();
198186

199187
const auto actual_file_name = "actual_" + fixture_file_name;
@@ -216,8 +204,6 @@ bool ImageMatchesFixture(const std::string& fixture_file_name,
216204
<< fml::paths::JoinPaths({fixtures_path, actual_file_name})
217205
<< std::endl;
218206
}
219-
printf("ImageMatchesFixture 4\n");
220-
fflush(stdout);
221207
return images_are_same;
222208
}
223209

0 commit comments

Comments
 (0)