summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2019-05-13 17:13:31 -0700
committerKonstantin Käfer <mail@kkaefer.com>2019-05-15 11:57:43 -0700
commit3a6ff7710fcf201f82ddc2090488ef585bd8ab17 (patch)
treede380cbb7f5553282b081dce9202cbe9e502ebe5 /test
parentbf0998697e0893d8a56421a139c7fc4855e89fa5 (diff)
downloadqtlocation-mapboxgl-3a6ff7710fcf201f82ddc2090488ef585bd8ab17.tar.gz
[core] add gfx::UploadPass, split startRender into prepare and upload
Diffstat (limited to 'test')
-rw-r--r--test/gl/bucket.test.cpp20
-rw-r--r--test/util/string.test.cpp4
2 files changed, 17 insertions, 7 deletions
diff --git a/test/gl/bucket.test.cpp b/test/gl/bucket.test.cpp
index 277d988f9e..ff01b590fc 100644
--- a/test/gl/bucket.test.cpp
+++ b/test/gl/bucket.test.cpp
@@ -56,7 +56,9 @@ TEST(Buckets, CircleBucket) {
ASSERT_TRUE(bucket.hasData());
ASSERT_TRUE(bucket.needsUpload());
- bucket.upload(context);
+ auto commandEncoder = context.createCommandEncoder();
+ auto uploadPass = commandEncoder->createUploadPass("upload");
+ bucket.upload(*uploadPass);
ASSERT_TRUE(bucket.hasData());
ASSERT_FALSE(bucket.needsUpload());
}
@@ -76,7 +78,9 @@ TEST(Buckets, FillBucket) {
ASSERT_TRUE(bucket.hasData());
ASSERT_TRUE(bucket.needsUpload());
- bucket.upload(context);
+ auto commandEncoder = context.createCommandEncoder();
+ auto uploadPass = commandEncoder->createUploadPass("upload");
+ bucket.upload(*uploadPass);
ASSERT_FALSE(bucket.needsUpload());
}
@@ -100,7 +104,9 @@ TEST(Buckets, LineBucket) {
ASSERT_TRUE(bucket.hasData());
ASSERT_TRUE(bucket.needsUpload());
- bucket.upload(context);
+ auto commandEncoder = context.createCommandEncoder();
+ auto uploadPass = commandEncoder->createUploadPass("upload");
+ bucket.upload(*uploadPass);
ASSERT_FALSE(bucket.needsUpload());
}
@@ -134,7 +140,9 @@ TEST(Buckets, SymbolBucket) {
ASSERT_TRUE(bucket.hasData());
ASSERT_TRUE(bucket.needsUpload());
- bucket.upload(context);
+ auto commandEncoder = context.createCommandEncoder();
+ auto uploadPass = commandEncoder->createUploadPass("upload");
+ bucket.upload(*uploadPass);
ASSERT_FALSE(bucket.needsUpload());
}
@@ -150,7 +158,9 @@ TEST(Buckets, RasterBucket) {
ASSERT_TRUE(bucket.hasData());
ASSERT_TRUE(bucket.needsUpload());
- bucket.upload(context);
+ auto commandEncoder = context.createCommandEncoder();
+ auto uploadPass = commandEncoder->createUploadPass("upload");
+ bucket.upload(*uploadPass);
ASSERT_FALSE(bucket.needsUpload());
bucket.clear();
diff --git a/test/util/string.test.cpp b/test/util/string.test.cpp
index 91e1b93685..f694702e69 100644
--- a/test/util/string.test.cpp
+++ b/test/util/string.test.cpp
@@ -21,9 +21,9 @@ TEST(ToString, FloatingPoint) {
TEST(ToHex, SIZE_T) {
#if INTPTR_MAX == INT32_MAX
- EXPECT_EQ("a715b247", util::toHex((size_t)0xa715b247));
+ EXPECT_EQ("a715b247", util::toHex((uint32_t)0xa715b247));
#elif INTPTR_MAX == INT64_MAX
- EXPECT_EQ("a715b247df38cc29", util::toHex((size_t)0xa715b247df38cc29));
+ EXPECT_EQ("a715b247df38cc29", util::toHex((uint64_t)0xa715b247df38cc29));
#endif
}