Skip to content

Commit

Permalink
adding empty string and null test
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Wilson <[email protected]>
  • Loading branch information
hyperbolic2346 committed Oct 17, 2023
1 parent e40572d commit 4d11f07
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/test/java/com/nvidia/spark/rapids/jni/ParseURITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ void parseURIToProtocolTest() {
"https://www.nvidia.com:8080/q",
"https://www.nvidia.com#8080",
"file://path/to/cool/file",
"http//www.nvidia.com/q"};
"http//www.nvidia.com/q",
"",
null};

String[] expectedStrings = new String[testData.length];
for (int i=0; i<testData.length; i++) {
Expand All @@ -57,6 +59,8 @@ void parseURIToProtocolTest() {
scheme = uri.getScheme();
} catch (URISyntaxException ex) {
// leave the scheme null if URI is invalid
} catch (NullPointerException ex) {
// leave the scheme null if URI is null
}
expectedStrings[i] = scheme;
}
Expand Down

0 comments on commit 4d11f07

Please sign in to comment.