mirror of
https://github.com/twiglet/cs2j.git
synced 2025-01-18 13:15:17 +01:00
GetHashCode -> hashCode and test
This commit is contained in:
parent
d0efb63ef9
commit
3ef2738687
@ -174,7 +174,7 @@ scope NSContext {
|
||||
methodRenames = new Dictionary<string,string>();
|
||||
methodRenames["ToString"] = "toString";
|
||||
methodRenames["Equals"] = "equals";
|
||||
methodRenames["GetHashCode"] = "getHashCode";
|
||||
methodRenames["GetHashCode"] = "hashCode";
|
||||
methodRenames["Clone"] = "clone";
|
||||
}
|
||||
return methodRenames;
|
||||
|
25
CSharpTranslator/tests/Tester/Misc/hashcode.cs
Normal file
25
CSharpTranslator/tests/Tester/Misc/hashcode.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
|
||||
// Test translation for lock statements
|
||||
|
||||
namespace Tester.Hash
|
||||
{
|
||||
|
||||
public class A {
|
||||
|
||||
public override int GetHashCode(){
|
||||
return 5;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class B {
|
||||
|
||||
public void fred(){
|
||||
A tmp = new A();
|
||||
int x = tmp.GetHashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user