Tests: Update Properties tests to include indexers
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user