chore: checkpoint current workspace changes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <XCEngine/Core/Asset/ArtifactContainer.h>
|
||||
#include <XCEngine/Core/Asset/AssetDatabase.h>
|
||||
#include <XCEngine/Core/Asset/AssetImportService.h>
|
||||
#include <XCEngine/Core/Asset/ResourceTypes.h>
|
||||
@@ -147,9 +148,19 @@ TEST(UIDocumentLoader, AssetDatabaseImportsViewArtifactAndReimportsWhenDependenc
|
||||
ASSERT_TRUE(firstResolve.artifactReady);
|
||||
EXPECT_EQ(fs::path(firstResolve.artifactMainPath.CStr()).extension().string(), ".xcuiasset");
|
||||
EXPECT_TRUE(fs::exists(firstResolve.artifactMainPath.CStr()));
|
||||
EXPECT_TRUE(IsArtifactContainerFile(firstResolve.artifactMainPath));
|
||||
EXPECT_FALSE(firstResolve.artifactMainEntryPath.Empty());
|
||||
EXPECT_NE(firstResolve.artifactMainEntryPath, firstResolve.artifactMainPath);
|
||||
|
||||
XCEngine::Containers::Array<XCEngine::Core::uint8> artifactPayload;
|
||||
ASSERT_TRUE(ReadArtifactContainerMainEntryPayload(
|
||||
firstResolve.artifactMainPath,
|
||||
ResourceType::UIView,
|
||||
artifactPayload));
|
||||
EXPECT_FALSE(artifactPayload.Empty());
|
||||
|
||||
UIViewLoader loader;
|
||||
LoadResult firstLoad = loader.Load(firstResolve.artifactMainPath.CStr());
|
||||
LoadResult firstLoad = loader.Load(firstResolve.artifactMainEntryPath.CStr());
|
||||
ASSERT_TRUE(firstLoad);
|
||||
auto* firstView = static_cast<UIView*>(firstLoad.resource);
|
||||
ASSERT_NE(firstView, nullptr);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <XCEngine/Core/Asset/ArtifactContainer.h>
|
||||
#include <XCEngine/Resources/UI/UIDocumentCompiler.h>
|
||||
#include <XCEngine/Resources/UI/UIDocumentLoaders.h>
|
||||
|
||||
@@ -103,6 +104,13 @@ TEST(UISchemaDocument, CompileAndArtifactLoadPopulateSchemaDefinition) {
|
||||
WriteUIDocumentArtifact(artifactPath.string().c_str(), compileResult, &artifactWriteError))
|
||||
<< artifactWriteError.CStr();
|
||||
|
||||
XCEngine::Containers::Array<XCEngine::Core::uint8> artifactPayload;
|
||||
ASSERT_TRUE(ReadArtifactContainerMainEntryPayload(
|
||||
artifactPath.string().c_str(),
|
||||
ResourceType::UISchema,
|
||||
artifactPayload));
|
||||
EXPECT_FALSE(artifactPayload.Empty());
|
||||
|
||||
UIDocumentCompileResult artifactResult = {};
|
||||
ASSERT_TRUE(LoadUIDocumentArtifact(
|
||||
artifactPath.string().c_str(),
|
||||
|
||||
Reference in New Issue
Block a user