Files
AR-Menu/Library/PackageCache/com.unity.cloud.ktx.webgl-2023@e3e0424a66c4/Tests/Editor/WebglEditorTests.cs
2025-11-30 08:35:03 +02:00

32 lines
1.0 KiB
C#

using System.IO;
using NUnit.Framework;
using UnityEngine;
using File = UnityEngine.Windows.File;
namespace KtxUnity.Webgl.Editor.Tests
{
class WebglEditorTests
{
const string k_PackagePrefix = "Packages/com.unity.cloud.ktx.webgl-2023/Runtime/Plugins/WebGL";
static readonly string[] k_WebglBinaries = {
$"{k_PackagePrefix}/libktx_read.a",
$"{k_PackagePrefix}/libktx_unity.a",
$"{k_PackagePrefix}/libobj_basisu_cbind.a"
};
[Test]
public void CheckNativeLibSize()
{
foreach (var webglBinary in k_WebglBinaries)
{
Assert.IsTrue(File.Exists(webglBinary));
var fi = new FileInfo(webglBinary);
// In source (GIT) the native WebGL library files are placeholders with a few bytes of text in them.
// The CI will replace them with actual binaries, all significantly bigger than 1024 bytes.
Assert.Greater(fi.Length, 1024);
}
}
}
}