Merge pull request #398 from CesiumGS/mac-test-failures

Fix macOS test failures.
This commit is contained in:
Nithin Pranesh 2021-11-29 11:03:44 -05:00 committed by GitHub
commit 67e73c6a3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 5 deletions

View File

@ -63,7 +63,6 @@ jobs:
osx_image: xcode12
script:
- cmake --build . --config Debug
- # Tests fail on macOS, see https://github.com/CesiumGS/cesium-native/issues/394
- ctest -V || echo "There are test failures, but we're not failing the build. See https://github.com/CesiumGS/cesium-native/issues/394"
- ctest -V
- # Doc build doesn't work on Mac (missing Doxygen). Let's just skip it.
- #cmake --build . --config Debug --target cesium-native-docs

View File

@ -129,7 +129,9 @@ static void createTestForScalarJson(
batchTableJson.GetAllocator());
scalarProperty.PushBack(value, batchTableJson.GetAllocator());
} else {
scalarProperty.PushBack(expected[i], batchTableJson.GetAllocator());
scalarProperty.PushBack(
ExpectedType(expected[i]),
batchTableJson.GetAllocator());
}
}
@ -202,7 +204,9 @@ static void createTestForArrayJson(
batchTableJson.GetAllocator());
innerArray.PushBack(value, batchTableJson.GetAllocator());
} else {
innerArray.PushBack(expected[i][j], batchTableJson.GetAllocator());
innerArray.PushBack(
ExpectedType(expected[i][j]),
batchTableJson.GetAllocator());
}
}
fixedArrayProperties.PushBack(innerArray, batchTableJson.GetAllocator());

View File

@ -8,6 +8,8 @@
using namespace CesiumAsync;
namespace {
class MockTaskProcessor : public ITaskProcessor {
public:
std::atomic<int32_t> tasksStarted = 0;
@ -18,6 +20,8 @@ public:
}
};
} // namespace
TEST_CASE("AsyncSystem") {
std::shared_ptr<MockTaskProcessor> pTaskProcessor =
std::make_shared<MockTaskProcessor>();

View File

@ -14,6 +14,8 @@
using namespace CesiumAsync;
namespace {
class MockStoreCacheDatabase : public ICacheDatabase {
public:
struct StoreRequestParameters {
@ -114,6 +116,8 @@ public:
virtual void startTask(std::function<void()> f) override { f(); }
};
} // namespace
TEST_CASE("Test the condition of caching the request") {
SECTION("Cache request") {
SECTION("Request with GET method, has max-age, cacheable status code") {

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "cesium-native",
"version": "0.8.0",
"version": "0.9.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {