GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix failing tests (#1591) · bodorismail/java-docs-samples@f951adf

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • vision/cloud-client/src/test/java/com/example/vision
    • DetectIT.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎vision/cloud-client/src/test/java/com/example/vision/DetectIT.java‎

Copy file name to clipboardExpand all lines: vision/cloud-client/src/test/java/com/example/vision/DetectIT.java
+6-5Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import java.io.IOException;
2828
import java.io.PrintStream;
2929
import java.util.UUID;
30+
import java.util.regex.Pattern;
3031

3132
import org.junit.After;
3233
import org.junit.Before;
@@ -46,7 +47,7 @@ public class DetectIT {
4647
private static final String OUTPUT_PREFIX = "OCR_PDF_TEST_OUTPUT_" + UUID.randomUUID().toString();
4748

4849
@Before
49-
public void setUp() throws IOException {
50+
public void setUp() {
5051
bout = new ByteArrayOutputStream();
5152
out = new PrintStream(bout);
5253
System.setOut(out);
@@ -312,8 +313,8 @@ public void testCropHints() throws Exception {
312313
// Assert
313314
String got = bout.toString();
314315
assertThat(got).contains("vertices {");
315-
assertThat(got).contains("x: 599");
316-
assertThat(got).contains("y: 475");
316+
assertThat(got).containsMatch(Pattern.compile("x: 2\\d{2}"));
317+
assertThat(got).containsMatch(Pattern.compile("y: 4\\d{2}"));
317318
}
318319

319320
@Test
@@ -325,8 +326,8 @@ public void testCropHintsGcs() throws Exception {
325326
// Assert
326327
String got = bout.toString();
327328
assertThat(got).contains("vertices {");
328-
assertThat(got).contains("x: 599");
329-
assertThat(got).contains("y: 475");
329+
assertThat(got).containsMatch(Pattern.compile("x: 2\\d{2}"));
330+
assertThat(got).containsMatch(Pattern.compile("y: 4\\d{2}"));
330331
}
331332

332333
@Test

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.