浏览代码

fix unit tests in DevProject (#3586)

/bug-failed-api-check
GitHub 5 年前
当前提交
6c5603ec
共有 6 个文件被更改,包括 3 次插入4 次删除
  1. 1
      com.unity.ml-agents/Tests/Editor/Sensor/RenderTextureSensorComponentTests.cs
  2. 5
      com.unity.ml-agents/Tests/Editor/Sensor/RenderTextureSensorTests.cs
  3. 1
      DevProject/Assets/placeholder.txt
  4. 0
      /com.unity.ml-agents/Tests/Editor/Sensor/RenderTextureSensorTests.cs.meta
  5. 0
      /com.unity.ml-agents/Tests/Editor/Sensor/RenderTextureSensorTests.cs

1
com.unity.ml-agents/Tests/Editor/Sensor/RenderTextureSensorComponentTests.cs


namespace MLAgents.Tests
{
[TestFixture]
public class RenderTextureSensorComponentTest
{

5
com.unity.ml-agents/Tests/Editor/Sensor/RenderTextureSensorTests.cs


namespace MLAgents.Tests
{
public class RenderTextureSensorTest
public class RenderTextureSensorTests
{
[Test]
public void TestRenderTextureSensor()

var writeAdapter = new WriteAdapter();
var obs = sensor.GetObservationProto(writeAdapter);
Assert.AreEqual((int) compression, (int) obs.CompressionType);
Assert.AreEqual((int)compression, (int)obs.CompressionType);
var expectedShape = new[] { height, width, grayscale ? 1 : 3 };
Assert.AreEqual(expectedShape, obs.Shape);
}

1
DevProject/Assets/placeholder.txt


lorem ipsum

/com.unity.ml-agents/Tests/Editor/Sensor/RenderTextureSenorTests.cs.meta → /com.unity.ml-agents/Tests/Editor/Sensor/RenderTextureSensorTests.cs.meta

/com.unity.ml-agents/Tests/Editor/Sensor/RenderTextureSenorTests.cs → /com.unity.ml-agents/Tests/Editor/Sensor/RenderTextureSensorTests.cs

正在加载...
取消
保存