summaryrefslogtreecommitdiff
path: root/test/style
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-01-26 18:52:44 +0100
committerKonstantin Käfer <mail@kkaefer.com>2017-01-27 11:44:16 +0100
commit62ea1f21858c69f6921c775ba7a3de201f0514d8 (patch)
tree7a4da88706e8a5513e1e13e993b2acc212cae3b1 /test/style
parenta662508ddde4043ece36d8ea9b424368891d892c (diff)
downloadqtlocation-mapboxgl-62ea1f21858c69f6921c775ba7a3de201f0514d8.tar.gz
[core] remove trailing whitespace, add trailing newlines, add space after //
Diffstat (limited to 'test/style')
-rw-r--r--test/style/conversion/geojson_options.test.cpp22
-rw-r--r--test/style/source.test.cpp8
-rw-r--r--test/style/style.test.cpp2
-rw-r--r--test/style/style_layer.test.cpp8
4 files changed, 20 insertions, 20 deletions
diff --git a/test/style/conversion/geojson_options.test.cpp b/test/style/conversion/geojson_options.test.cpp
index 14a7adbba7..ddf261ea52 100644
--- a/test/style/conversion/geojson_options.test.cpp
+++ b/test/style/conversion/geojson_options.test.cpp
@@ -28,13 +28,13 @@ TEST(GeoJSONOptions, RetainsDefaults) {
Value raw(map);
GeoJSONOptions converted = *convert<GeoJSONOptions>(raw);
GeoJSONOptions defaults;
-
- //GeoJSON-VT
+
+ // GeoJSON-VT
ASSERT_EQ(converted.maxzoom, defaults.maxzoom);
ASSERT_EQ(converted.buffer, defaults.buffer);
ASSERT_EQ(converted.tolerance, defaults.tolerance);
-
- //Supercluster
+
+ // Supercluster
ASSERT_EQ(converted.cluster, defaults.cluster);
ASSERT_EQ(converted.clusterRadius, defaults.clusterRadius);
ASSERT_EQ(converted.clusterMaxZoom, defaults.clusterMaxZoom);
@@ -43,25 +43,25 @@ TEST(GeoJSONOptions, RetainsDefaults) {
TEST(GeoJSONOptions, FullConversion) {
ValueMap map {
- //GeoJSON-VT
+ // GeoJSON-VT
{"maxzoom", 1.0f},
{"buffer", 2.0f},
{"tolerance", 3.0f},
-
- //Supercluster
+
+ // Supercluster
{"cluster", true},
{"clusterRadius", 4.0f},
{"clusterMaxZoom", 5.0f}
};
Value raw(map);
GeoJSONOptions converted = *convert<GeoJSONOptions>(raw);
-
- //GeoJSON-VT
+
+ // GeoJSON-VT
ASSERT_EQ(converted.maxzoom, 1);
ASSERT_EQ(converted.buffer, 2);
ASSERT_EQ(converted.tolerance, 3);
-
- //Supercluster
+
+ // Supercluster
ASSERT_EQ(converted.cluster, true);
ASSERT_EQ(converted.clusterRadius, 4);
ASSERT_EQ(converted.clusterMaxZoom, 5);
diff --git a/test/style/source.test.cpp b/test/style/source.test.cpp
index 01f54d6b18..fb7737e417 100644
--- a/test/style/source.test.cpp
+++ b/test/style/source.test.cpp
@@ -393,7 +393,7 @@ TEST(Source, GeoJSonSourceUrlUpdate) {
};
test.observer.sourceDescriptionChanged = [&] (Source&) {
- //Should be called (test will hang if it doesn't)
+ // Should be called (test will hang if it doesn't)
test.end();
};
@@ -404,12 +404,12 @@ TEST(Source, GeoJSonSourceUrlUpdate) {
GeoJSONSource source("source");
source.baseImpl->setObserver(&test.observer);
- //Load initial, so the source state will be loaded=true
+ // Load initial, so the source state will be loaded=true
source.baseImpl->loadDescription(test.fileSource);
- //Schedule an update
+ // Schedule an update
test.loop.invoke([&] () {
- //Update the url
+ // Update the url
source.setURL(std::string("http://source-url.ext"));
});
diff --git a/test/style/style.test.cpp b/test/style/style.test.cpp
index 89c5c4ce6f..b49058420e 100644
--- a/test/style/style.test.cpp
+++ b/test/style/style.test.cpp
@@ -131,6 +131,6 @@ TEST(Style, DuplicateSource) {
style.addSource(std::make_unique<VectorSource>("sourceId", "mapbox://mapbox.mapbox-terrain-v2"));
FAIL() << "Should not have been allowed to add a duplicate source id";
} catch (std::runtime_error) {
- //Expected
+ // Expected
}
}
diff --git a/test/style/style_layer.test.cpp b/test/style/style_layer.test.cpp
index 8356f3accd..773d172876 100644
--- a/test/style/style_layer.test.cpp
+++ b/test/style/style_layer.test.cpp
@@ -278,20 +278,20 @@ TEST(Layer, Observer) {
TEST(Layer, DuplicateLayer) {
util::RunLoop loop;
- //Setup style
+ // Setup style
StubFileSource fileSource;
Style style { fileSource, 1.0 };
style.setJSON(util::read_file("test/fixtures/resources/style-unused-sources.json"));
- //Add initial layer
+ // Add initial layer
style.addLayer(std::make_unique<LineLayer>("line", "unusedsource"));
- //Try to add duplicate
+ // Try to add duplicate
try {
style.addLayer(std::make_unique<LineLayer>("line", "unusedsource"));
FAIL() << "Should not have been allowed to add a duplicate layer id";
} catch (const std::runtime_error e) {
- //Expected
+ // Expected
ASSERT_STREQ("Layer line already exists", e.what());
}
}