mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-11-25 19:23:17 +01:00
326777ca4a
* Ryujinx.Tests: Add unicorn to test framework * CpuTestSimdArithmetic: Comment out inaccurate results
28 lines
620 B
C#
28 lines
620 B
C#
using System;
|
|
|
|
namespace Ryujinx.Tests.Unicorn
|
|
{
|
|
public class IndexedProperty<TIndex, TValue>
|
|
{
|
|
readonly Action<TIndex, TValue> SetAction;
|
|
readonly Func<TIndex, TValue> GetFunc;
|
|
|
|
public IndexedProperty(Func<TIndex, TValue> getFunc, Action<TIndex, TValue> setAction)
|
|
{
|
|
this.GetFunc = getFunc;
|
|
this.SetAction = setAction;
|
|
}
|
|
|
|
public TValue this[TIndex i]
|
|
{
|
|
get
|
|
{
|
|
return GetFunc(i);
|
|
}
|
|
set
|
|
{
|
|
SetAction(i, value);
|
|
}
|
|
}
|
|
}
|
|
}
|