You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
901 B
35 lines
901 B
using NUnit.Framework;
|
|
|
|
namespace UnityEngine.Rendering
|
|
{
|
|
class CoreRenderPipelinePreferencesTests
|
|
{
|
|
[Test]
|
|
public void RegisterInvalidPreferenceColorName()
|
|
{
|
|
bool RegisterColor(string colorName)
|
|
{
|
|
try
|
|
{
|
|
CoreRenderPipelinePreferences.RegisterPreferenceColor(colorName, Color.black);
|
|
}
|
|
catch
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
Assert.False(RegisterColor(null));
|
|
Assert.False(RegisterColor(""));
|
|
}
|
|
|
|
[Test]
|
|
public void RegisterPreferenceColor()
|
|
{
|
|
var color = CoreRenderPipelinePreferences.RegisterPreferenceColor("TEST/DEFAULT_GREEN", Color.green);
|
|
Assert.True(color() == Color.green);
|
|
}
|
|
}
|
|
}
|