Tests: Update Properties tests to include indexers

This commit is contained in:
Katy Coe
2019-11-09 23:59:41 +01:00
parent 6cff0f3803
commit 5bee7665e9
4 changed files with 36 additions and 8 deletions

View File

@@ -12,5 +12,18 @@ namespace Il2CppTests.TestSources
protected int prop2 { get; private set; }
protected int prop3 { private get; set; }
public static int prop4 { private get; set; }
// Read-only ndexers
public string this[int i] => "foo";
public string this[double d] => "bar";
// Write-only indexer
public string this[long l] { set {} }
// Read/write indexer
public string this[float f] { get => "baz"; set {} }
// Multi-dimensional indexer
public bool this[int i, int j] => true;
}
}