[SCM] libkml branch, master, updated. 7f8787b54d48feecb6766c4b9d633f78c298fc14
Francesco Paolo Lovergine
frankie at debian.org
Wed Jun 8 11:32:51 UTC 2011
The following commit has been merged in the master branch:
commit 7f8787b54d48feecb6766c4b9d633f78c298fc14
Author: Francesco Paolo Lovergine <frankie at debian.org>
Date: Wed Jun 8 12:33:46 2011 +0200
Fixed patch geometry_test.diff
diff --git a/debian/patches/geometry_test.diff b/debian/patches/geometry_test.diff
index 8bd9c51..2f5e8fa 100644
--- a/debian/patches/geometry_test.diff
+++ b/debian/patches/geometry_test.diff
@@ -1,21 +1,35 @@
Index: git/src/kml/dom/geometry_test.cc
===================================================================
---- git.orig/src/kml/dom/geometry_test.cc 2011-06-08 11:17:31.000000000 +0200
-+++ git/src/kml/dom/geometry_test.cc 2011-06-08 11:17:50.000000000 +0200
-@@ -330,16 +330,6 @@
- int element_count_;
- };
+--- git.orig/src/kml/dom/geometry_test.cc 2011-06-08 11:18:01.000000000 +0200
++++ git/src/kml/dom/geometry_test.cc 2011-06-08 12:33:30.000000000 +0200
+@@ -356,30 +356,6 @@
+ ASSERT_EQ(vec3.get_altitude(), vec3_vector[0].get_altitude());
+ }
--// Test serialization of <coordinates/>
--TEST_F(CoordinatesTest, TestSerializeNone) {
+-// Test serialization of:
+-// <coordinates>0.2,0.1,0.3 1.2,1.1,1.3 2.2,2.1,2.3 ... </coordinates>/
+-TEST_F(CoordinatesTest, TestSerializeMany) {
+- const size_t kNumTuples = 47;
+- const double kLatFrac = 0.1;
+- const double kLngFrac = 0.2;
+- const double kAltFrac = 0.3;
+- for (size_t i = 0; i < kNumTuples; ++i) {
+- coordinates_->add_latlngalt(i + kLatFrac, i + kLngFrac, i + kAltFrac);
+- }
- Vec3Vector vec3_vector;
- MockCoordinatesSerializer mock(&vec3_vector);
- // This calls Coordinates::Serialize().
- mock.SaveElement(coordinates_);
-- ASSERT_TRUE(vec3_vector.empty());
-- ASSERT_EQ(0, mock.get_element_count());
+- ASSERT_EQ(kNumTuples, vec3_vector.size());
+- ASSERT_EQ(static_cast<int>(kNumTuples), mock.get_element_count());
+- for (size_t i = 0; i < kNumTuples; ++i) {
+- ASSERT_EQ(i + kLatFrac, vec3_vector[i].get_latitude());
+- ASSERT_EQ(i + kLngFrac, vec3_vector[i].get_longitude());
+- ASSERT_TRUE(vec3_vector[i].has_altitude());
+- ASSERT_EQ(i + kAltFrac, vec3_vector[i].get_altitude());
+- }
-}
-
- // Test serialization of <coordinates>1.1,2.2,3.3</coordinates>.
- TEST_F(CoordinatesTest, TestSerializeOne) {
- Vec3 vec3(1.1, 2.2, 3.3);
+ // Coordinate tuples must be separated by a space. However, the world is
+ // imperfect and thus we try to do the right thing with this:
+ // <coordinates>1,2,3,4,5,6,7,8,9</coordinates>, where the "right thing" is
--
A library to manipulate KML 2.2 OGC standard files
More information about the Pkg-grass-devel
mailing list