mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
Test for hashCode()
This commit is contained in:
parent
853ee503e7
commit
7774b7c04a
@ -69,5 +69,16 @@ public class DynamicValues {
|
|||||||
static long currentTimeMillis() {
|
static long currentTimeMillis() {
|
||||||
return System.currentTimeMillis();
|
return System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Export
|
||||||
|
static int testHashCode() {
|
||||||
|
Object obj1 = new Object();
|
||||||
|
Object obj2 = new Object();
|
||||||
|
int result = 0;
|
||||||
|
result |= obj1.hashCode() != 0 ? 1 : 0;
|
||||||
|
result |= obj1.hashCode() != obj2.hashCode() ? 2 : 0;
|
||||||
|
result |= obj1.hashCode() == obj1.hashCode() ? 4 : 0;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user