Skip to content

Commit

Permalink
moving negative tests that spark accepts up to simple 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 13, 2023
1 parent e7ea344 commit 04f94c4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/cpp/tests/parse_uri.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ TEST_F(ParseURIProtocolTests, Simple)
"http://www.yahoo.com",
"file://path/to/a/cool/file",
"smb://network/path/to/file",
"http:/www.yahoo.com",
"file:path/to/a/cool/file",
});
auto result = spark_rapids_jni::parse_uri_to_protocol(cudf::strings_column_view{col});

cudf::test::strings_column_wrapper expected({"https", "http", "file", "smb"});
cudf::test::strings_column_wrapper expected({"https", "http", "file", "smb", "http", "file"});

CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(result->view(), expected);
}
Expand All @@ -42,15 +44,13 @@ TEST_F(ParseURIProtocolTests, Negatives)
{
cudf::test::strings_column_wrapper col({
"https//www.google.com/s/uri?param1=2",
"http:/www.yahoo.com",
"file:path/to/a/cool/file",
"/network/path/to/file",
"yahoo.com",
"www.google.com/s/uri",
});
auto result = spark_rapids_jni::parse_uri_to_protocol(cudf::strings_column_view{col});

cudf::test::strings_column_wrapper expected({"", "http", "file", "", "", ""}, {0, 1, 1, 0, 0, 0});
cudf::test::strings_column_wrapper expected({"", "", "", ""}, {0, 0, 0, 0});

CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(result->view(), expected);
}
Expand Down

0 comments on commit 04f94c4

Please sign in to comment.