From 9934af0c9c9be037b0f13903afc303322bf68673 Mon Sep 17 00:00:00 2001 From: Bing Li Date: Thu, 7 Mar 2024 16:25:39 -0800 Subject: [PATCH] fix test --- .../snowpark_test/JavaGeographySuite.java | 2 +- .../snowpark_test/IndependentClassSuite.scala | 21 ++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/snowflake/snowpark_test/JavaGeographySuite.java b/src/test/java/com/snowflake/snowpark_test/JavaGeographySuite.java index 5eb61e87..ddb03e15 100644 --- a/src/test/java/com/snowflake/snowpark_test/JavaGeographySuite.java +++ b/src/test/java/com/snowflake/snowpark_test/JavaGeographySuite.java @@ -17,7 +17,7 @@ public void testRoundTrip() { assert (Geography.fromGeoJSON(testData).asGeoJSON().equals(testData)); assert (Geography.fromGeoJSON(testData).toString().equals(testData)); - assert (Geometry.fromGeoJSON(testData2).toString().equals(testData)); + assert (Geometry.fromGeoJSON(testData2).toString().equals(testData2)); } @Test diff --git a/src/test/scala/com/snowflake/snowpark_test/IndependentClassSuite.scala b/src/test/scala/com/snowflake/snowpark_test/IndependentClassSuite.scala index 661e29ac..7ffe6950 100644 --- a/src/test/scala/com/snowflake/snowpark_test/IndependentClassSuite.scala +++ b/src/test/scala/com/snowflake/snowpark_test/IndependentClassSuite.scala @@ -15,7 +15,10 @@ class IndependentClassSuite extends FunSuite { checkDependencies( "target/classes/com/snowflake/snowpark/types/Variant$.class", - Seq("com.snowflake.snowpark.types.Variant", "com.snowflake.snowpark.types.Geography")) + Seq( + "com.snowflake.snowpark.types.Variant", + "com.snowflake.snowpark.types.Geography", + "com.snowflake.snowpark.types.Geometry")) } test("java variant") { @@ -42,6 +45,22 @@ class IndependentClassSuite extends FunSuite { Seq("com.snowflake.snowpark_java.types.Geography")) } + test("scala geometry") { + checkDependencies( + "target/classes/com/snowflake/snowpark/types/Geometry.class", + Seq("com.snowflake.snowpark.types.Geometry")) + + checkDependencies( + "target/classes/com/snowflake/snowpark/types/Geometry$.class", + Seq("com.snowflake.snowpark.types.Geometry")) + } + + test("java geometry") { + checkDependencies( + "target/classes/com/snowflake/snowpark_java/types/Geometry.class", + Seq("com.snowflake.snowpark_java.types.Geometry")) + } + // negative test, to make sure this test method works test("session") { assertThrows[TestFailedException] {