using EvilEngine.Adapters.Source.Maps; namespace EvilEngine.Adapters.Tests; public sealed class SourcePropLightTests { [Theory] [InlineData(0, 0)] [InlineData(255, 4.594793)] [InlineData(128, 1.0)] [InlineData(30, 0.0415)] public void ReadsAStoredByteAsTwiceItInGammaSpace(byte stored, double linear) { Assert.Equal(linear, SourcePropLight.Linear(stored), 0.01); } [Theory] [InlineData("props/0/light", 0)] [InlineData("props/181/light", 181)] [InlineData("props/01/light", null)] [InlineData("props/-1/light", null)] [InlineData("props/3", null)] public void NamesAPropsLightByItsIndex(string part, int? prop) { Assert.Equal(prop, SourcePropLight.Prop(part)); } }