From 1cbd9bc6ff7a4a80f62ddb9f62250948fcd4a82f Mon Sep 17 00:00:00 2001 From: Harsh4902 Date: Thu, 6 Jun 2024 12:37:11 +0000 Subject: [PATCH] changed way of URI generation in FileTest class --- output.txt | 1 + src/tests/gov/nasa/jpf/test/java/io/FileTest.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 output.txt diff --git a/output.txt b/output.txt new file mode 100644 index 00000000..39e2f69b --- /dev/null +++ b/output.txt @@ -0,0 +1 @@ +After. diff --git a/src/tests/gov/nasa/jpf/test/java/io/FileTest.java b/src/tests/gov/nasa/jpf/test/java/io/FileTest.java index 2e29667f..7dec5c5f 100644 --- a/src/tests/gov/nasa/jpf/test/java/io/FileTest.java +++ b/src/tests/gov/nasa/jpf/test/java/io/FileTest.java @@ -110,8 +110,8 @@ public void testToURI(){ File file = new File("testfile.txt"); URI expectedURI = null; try { - expectedURI = new URI("file:testfile.txt"); - } catch (URISyntaxException e) { + expectedURI = new File(file.getAbsolutePath()).toURI(); + } catch (Exception e) { fail("URISyntaxException thrown while constructing expected URI"); }