mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-07-31 15:58:27 -04:00
26 lines
757 B
C#
26 lines
757 B
C#
namespace NetworkTests;
|
|
|
|
// Issue #11195: small compiled shaders (.shader_c < 64KB) took the in-memory small-file path and
|
|
// failed to load on joining clients (ERROR_FILEOPEN). Native-loaded formats must always go large.
|
|
[TestClass]
|
|
public class NetworkFileRoutingTest
|
|
{
|
|
[TestMethod]
|
|
public void SmallShaderUsesLargeDownload()
|
|
{
|
|
Assert.IsTrue( GameInstanceDll.ShouldUseLargeDownload( "shaders/toon_postprocess.shader_c", 1024 ) );
|
|
}
|
|
|
|
[TestMethod]
|
|
public void SmallNonEngineFileUsesSmallDownload()
|
|
{
|
|
Assert.IsFalse( GameInstanceDll.ShouldUseLargeDownload( "styles/menu.scss", 1024 ) );
|
|
}
|
|
|
|
[TestMethod]
|
|
public void LargeFileUsesLargeDownload()
|
|
{
|
|
Assert.IsTrue( GameInstanceDll.ShouldUseLargeDownload( "styles/menu.scss", 1024 * 64 ) );
|
|
}
|
|
}
|