public class com.google.common.testing.EqualsTesterTest extends junit.framework.TestCase
{
private com.google.common.testing.EqualsTesterTest$ValidTestObject reference;
private com.google.common.testing.EqualsTester equalsTester;
private com.google.common.testing.EqualsTesterTest$ValidTestObject equalObject;
private com.google.common.testing.EqualsTesterTest$ValidTestObject equalObject;
private com.google.common.testing.EqualsTesterTest$ValidTestObject notEqualObject;
public void <init>()
{
com.google.common.testing.EqualsTesterTest v;
v := @this: com.google.common.testing.EqualsTesterTest;
specialinvoke v.<junit.framework.TestCase: void <init>()>();
return;
}
public void setUp() throws java.lang.Exception
{
com.google.common.testing.EqualsTesterTest v;
com.google.common.testing.EqualsTesterTest$ValidTestObject v, v, v, v;
com.google.common.testing.EqualsTester v;
v := @this: com.google.common.testing.EqualsTesterTest;
specialinvoke v.<junit.framework.TestCase: void setUp()>();
v = new com.google.common.testing.EqualsTesterTest$ValidTestObject;
specialinvoke v.<com.google.common.testing.EqualsTesterTest$ValidTestObject: void <init>(int,int)>(1, 2);
v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject reference> = v;
v = new com.google.common.testing.EqualsTester;
specialinvoke v.<com.google.common.testing.EqualsTester: void <init>()>();
v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester> = v;
v = new com.google.common.testing.EqualsTesterTest$ValidTestObject;
specialinvoke v.<com.google.common.testing.EqualsTesterTest$ValidTestObject: void <init>(int,int)>(1, 2);
v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject equalObject1> = v;
v = new com.google.common.testing.EqualsTesterTest$ValidTestObject;
specialinvoke v.<com.google.common.testing.EqualsTesterTest$ValidTestObject: void <init>(int,int)>(1, 2);
v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject equalObject2> = v;
v = new com.google.common.testing.EqualsTesterTest$ValidTestObject;
specialinvoke v.<com.google.common.testing.EqualsTesterTest$ValidTestObject: void <init>(int,int)>(0, 2);
v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject notEqualObject1> = v;
return;
}
public void testAddNullReference()
{
java.lang.Object[] v;
com.google.common.testing.EqualsTesterTest v;
java.lang.NullPointerException v;
com.google.common.testing.EqualsTester v;
v := @this: com.google.common.testing.EqualsTesterTest;
label:
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
v = newarray (java.lang.Object)[1];
v[0] = null;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
staticinvoke <com.google.common.testing.EqualsTesterTest: void fail(java.lang.String)>("Should fail on null reference");
label:
goto label;
label:
v := @caughtexception;
label:
return;
catch java.lang.NullPointerException from label to label with label;
}
public void testAddTwoEqualObjectsAtOnceWithNull()
{
java.lang.Object[] v;
com.google.common.testing.EqualsTesterTest v;
com.google.common.testing.EqualsTesterTest$ValidTestObject v, v;
java.lang.NullPointerException v;
com.google.common.testing.EqualsTester v;
v := @this: com.google.common.testing.EqualsTesterTest;
label:
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
v = newarray (java.lang.Object)[3];
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject reference>;
v[0] = v;
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject equalObject1>;
v[1] = v;
v[2] = null;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
staticinvoke <com.google.common.testing.EqualsTesterTest: void fail(java.lang.String)>("Should fail on null equal object");
label:
goto label;
label:
v := @caughtexception;
label:
return;
catch java.lang.NullPointerException from label to label with label;
}
public void testAddNullEqualObject()
{
java.lang.Object[] v, v;
com.google.common.testing.EqualsTesterTest v;
com.google.common.testing.EqualsTesterTest$ValidTestObject v;
java.lang.NullPointerException v;
com.google.common.testing.EqualsTester v;
v := @this: com.google.common.testing.EqualsTesterTest;
label:
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
v = newarray (java.lang.Object)[2];
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject reference>;
v[0] = v;
v = (java.lang.Object[]) null;
v[1] = v;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
staticinvoke <com.google.common.testing.EqualsTesterTest: void fail(java.lang.String)>("Should fail on null equal object");
label:
goto label;
label:
v := @caughtexception;
label:
return;
catch java.lang.NullPointerException from label to label with label;
}
public void testAddEqualObjectWithOArgConstructor()
{
java.lang.Throwable v;
java.lang.Object[] v;
com.google.common.testing.EqualsTesterTest$ValidTestObject v, v, v, v;
com.google.common.testing.EqualsTester v, v;
com.google.common.testing.EqualsTesterTest v;
java.lang.String v;
v := @this: com.google.common.testing.EqualsTesterTest;
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
v = newarray (java.lang.Object)[2];
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject equalObject1>;
v[0] = v;
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject notEqualObject1>;
v[1] = v;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
label:
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester testEquals()>();
label:
goto label;
label:
v := @caughtexception;
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject equalObject1>;
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject notEqualObject1>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (com.google.common.testing.EqualsTesterTest$ValidTestObject,com.google.common.testing.EqualsTesterTest$ValidTestObject)>(v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u [group 1, item 1] must be Object#equals to \u [group 1, item 2]");
staticinvoke <com.google.common.testing.EqualsTesterTest: void assertErrorMessage(java.lang.Throwable,java.lang.String)>(v, v);
return;
label:
staticinvoke <com.google.common.testing.EqualsTesterTest: void fail(java.lang.String)>("Should get not equal to equal object error");
return;
catch junit.framework.AssertionFailedError from label to label with label;
}
public void testTestEqualsEmptyLists()
{
java.lang.Object[] v;
com.google.common.testing.EqualsTesterTest v;
com.google.common.testing.EqualsTesterTest$ValidTestObject v;
com.google.common.testing.EqualsTester v, v;
v := @this: com.google.common.testing.EqualsTesterTest;
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
v = newarray (java.lang.Object)[1];
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject reference>;
v[0] = v;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester testEquals()>();
return;
}
public void testTestEqualsEqualsObjects()
{
java.lang.Object[] v;
com.google.common.testing.EqualsTesterTest v;
com.google.common.testing.EqualsTesterTest$ValidTestObject v, v, v;
com.google.common.testing.EqualsTester v, v;
v := @this: com.google.common.testing.EqualsTesterTest;
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
v = newarray (java.lang.Object)[3];
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject reference>;
v[0] = v;
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject equalObject1>;
v[1] = v;
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject equalObject2>;
v[2] = v;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester testEquals()>();
return;
}
public void testNonReflexiveEquals()
{
java.lang.Throwable v;
java.lang.Object[] v;
com.google.common.testing.EqualsTesterTest v;
java.lang.String v;
com.google.common.testing.EqualsTesterTest$NonReflexiveObject v;
com.google.common.testing.EqualsTester v, v;
v := @this: com.google.common.testing.EqualsTesterTest;
v = new com.google.common.testing.EqualsTesterTest$NonReflexiveObject;
specialinvoke v.<com.google.common.testing.EqualsTesterTest$NonReflexiveObject: void <init>()>();
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
v = newarray (java.lang.Object)[1];
v[0] = v;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
label:
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester testEquals()>();
label:
goto label;
label:
v := @caughtexception;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (com.google.common.testing.EqualsTesterTest$NonReflexiveObject)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u must be Object#equals to itself");
staticinvoke <com.google.common.testing.EqualsTesterTest: void assertErrorMessage(java.lang.Throwable,java.lang.String)>(v, v);
return;
label:
staticinvoke <com.google.common.testing.EqualsTesterTest: void fail(java.lang.String)>("Should get non-reflexive error");
return;
catch junit.framework.AssertionFailedError from label to label with label;
}
public void testInvalidEqualsNull()
{
java.lang.Throwable v;
java.lang.Object[] v;
com.google.common.testing.EqualsTesterTest v;
com.google.common.testing.EqualsTesterTest$InvalidEqualsNullObject v;
java.lang.String v;
com.google.common.testing.EqualsTester v, v;
v := @this: com.google.common.testing.EqualsTesterTest;
v = new com.google.common.testing.EqualsTesterTest$InvalidEqualsNullObject;
specialinvoke v.<com.google.common.testing.EqualsTesterTest$InvalidEqualsNullObject: void <init>()>();
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
v = newarray (java.lang.Object)[1];
v[0] = v;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
label:
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester testEquals()>();
label:
goto label;
label:
v := @caughtexception;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (com.google.common.testing.EqualsTesterTest$InvalidEqualsNullObject)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u must not be Object#equals to null");
staticinvoke <com.google.common.testing.EqualsTesterTest: void assertErrorMessage(java.lang.Throwable,java.lang.String)>(v, v);
return;
label:
staticinvoke <com.google.common.testing.EqualsTesterTest: void fail(java.lang.String)>("Should get equal to null error");
return;
catch junit.framework.AssertionFailedError from label to label with label;
}
public void testInvalidEqualsIncompatibleClass()
{
java.lang.Throwable v;
java.lang.Object[] v;
com.google.common.testing.EqualsTesterTest v;
java.lang.String v;
com.google.common.testing.EqualsTesterTest$InvalidEqualsIncompatibleClassObject v;
com.google.common.testing.EqualsTester v, v;
v := @this: com.google.common.testing.EqualsTesterTest;
v = new com.google.common.testing.EqualsTesterTest$InvalidEqualsIncompatibleClassObject;
specialinvoke v.<com.google.common.testing.EqualsTesterTest$InvalidEqualsIncompatibleClassObject: void <init>()>();
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
v = newarray (java.lang.Object)[1];
v[0] = v;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
label:
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester testEquals()>();
label:
goto label;
label:
v := @caughtexception;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (com.google.common.testing.EqualsTesterTest$InvalidEqualsIncompatibleClassObject)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u must not be Object#equals to an arbitrary object of another class");
staticinvoke <com.google.common.testing.EqualsTesterTest: void assertErrorMessage(java.lang.Throwable,java.lang.String)>(v, v);
return;
label:
staticinvoke <com.google.common.testing.EqualsTesterTest: void fail(java.lang.String)>("Should get equal to incompatible class error");
return;
catch junit.framework.AssertionFailedError from label to label with label;
}
public void testInvalidNotEqualsEqualObject()
{
java.lang.Throwable v;
java.lang.Object[] v;
com.google.common.testing.EqualsTesterTest$ValidTestObject v, v, v, v;
com.google.common.testing.EqualsTester v, v;
com.google.common.testing.EqualsTesterTest v;
java.lang.String v, v;
v := @this: com.google.common.testing.EqualsTesterTest;
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
v = newarray (java.lang.Object)[2];
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject reference>;
v[0] = v;
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject notEqualObject1>;
v[1] = v;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
label:
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester testEquals()>();
label:
goto label;
label:
v := @caughtexception;
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject reference>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (com.google.common.testing.EqualsTesterTest$ValidTestObject)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u [group 1, item 1]");
staticinvoke <com.google.common.testing.EqualsTesterTest: void assertErrorMessage(java.lang.Throwable,java.lang.String)>(v, v);
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$ValidTestObject notEqualObject1>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (com.google.common.testing.EqualsTesterTest$ValidTestObject)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u [group 1, item 2]");
staticinvoke <com.google.common.testing.EqualsTesterTest: void assertErrorMessage(java.lang.Throwable,java.lang.String)>(v, v);
return;
label:
staticinvoke <com.google.common.testing.EqualsTesterTest: void fail(java.lang.String)>("Should get not equal to equal object error");
return;
catch junit.framework.AssertionFailedError from label to label with label;
}
public void testInvalidHashCode()
{
java.lang.Throwable v;
java.lang.Object[] v;
com.google.common.testing.EqualsTesterTest$InvalidHashCodeObject v, v;
com.google.common.testing.EqualsTester v, v;
com.google.common.testing.EqualsTesterTest v;
int v, v;
java.lang.String v;
v := @this: com.google.common.testing.EqualsTesterTest;
v = new com.google.common.testing.EqualsTesterTest$InvalidHashCodeObject;
specialinvoke v.<com.google.common.testing.EqualsTesterTest$InvalidHashCodeObject: void <init>(int,int)>(1, 2);
v = new com.google.common.testing.EqualsTesterTest$InvalidHashCodeObject;
specialinvoke v.<com.google.common.testing.EqualsTesterTest$InvalidHashCodeObject: void <init>(int,int)>(1, 2);
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
v = newarray (java.lang.Object)[2];
v[0] = v;
v[1] = v;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
label:
v = v.<com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTester equalsTester>;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester testEquals()>();
label:
goto label;
label:
v := @caughtexception;
v = virtualinvoke v.<java.lang.Object: int hashCode()>();
v = virtualinvoke v.<java.lang.Object: int hashCode()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int,com.google.common.testing.EqualsTesterTest$InvalidHashCodeObject,int,com.google.common.testing.EqualsTesterTest$InvalidHashCodeObject)>(v, v, v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("the Object#hashCode (\u) of \u [group 1, item 1] must be equal to the Object#hashCode (\u) of \u0001");
staticinvoke <com.google.common.testing.EqualsTesterTest: void assertErrorMessage(java.lang.Throwable,java.lang.String)>(v, v);
return;
label:
staticinvoke <com.google.common.testing.EqualsTesterTest: void fail(java.lang.String)>("Should get invalid hashCode error");
return;
catch junit.framework.AssertionFailedError from label to label with label;
}
public void testNullEqualityGroup()
{
java.lang.Object[] v;
com.google.common.testing.EqualsTesterTest v;
java.lang.NullPointerException v;
com.google.common.testing.EqualsTester v;
v := @this: com.google.common.testing.EqualsTesterTest;
v = new com.google.common.testing.EqualsTester;
specialinvoke v.<com.google.common.testing.EqualsTester: void <init>()>();
label:
v = (java.lang.Object[]) null;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
staticinvoke <com.google.common.testing.EqualsTesterTest: void fail()>();
label:
goto label;
label:
v := @caughtexception;
label:
return;
catch java.lang.NullPointerException from label to label with label;
}
public void testNullObjectInEqualityGroup()
{
java.lang.Object[] v;
com.google.common.testing.EqualsTesterTest v;
java.lang.Integer v, v;
java.lang.NullPointerException v;
com.google.common.testing.EqualsTester v;
v := @this: com.google.common.testing.EqualsTesterTest;
v = new com.google.common.testing.EqualsTester;
specialinvoke v.<com.google.common.testing.EqualsTester: void <init>()>();
label:
v = newarray (java.lang.Object)[3];
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(1);
v[0] = v;
v[1] = null;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(3);
v[2] = v;
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
staticinvoke <com.google.common.testing.EqualsTesterTest: void fail()>();
label:
goto label;
label:
v := @caughtexception;
staticinvoke <com.google.common.testing.EqualsTesterTest: void assertErrorMessage(java.lang.Throwable,java.lang.String)>(v, "at index 1");
label:
return;
catch java.lang.NullPointerException from label to label with label;
}
public void testSymmetryBroken()
{
java.lang.Throwable v;
java.lang.Object[] v;
com.google.common.testing.EqualsTesterTest$NamedObject v, v, v;
java.lang.String[] v;
com.google.common.testing.EqualsTester v, v;
com.google.common.testing.EqualsTesterTest v;
v := @this: com.google.common.testing.EqualsTesterTest;
v = new com.google.common.testing.EqualsTester;
specialinvoke v.<com.google.common.testing.EqualsTester: void <init>()>();
v = newarray (java.lang.Object)[2];
v = staticinvoke <com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$NamedObject named(java.lang.String)>("foo");
v = newarray (java.lang.String)[1];
v[0] = "bar";
v = virtualinvoke v.<com.google.common.testing.EqualsTesterTest$NamedObject: com.google.common.testing.EqualsTesterTest$NamedObject addPeers(java.lang.String[])>(v);
v[0] = v;
v = staticinvoke <com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$NamedObject named(java.lang.String)>("bar");
v[1] = v;
v = virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
label:
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester testEquals()>();
label:
goto label;
label:
v := @caughtexception;
staticinvoke <com.google.common.testing.EqualsTesterTest: void assertErrorMessage(java.lang.Throwable,java.lang.String)>(v, "bar [group 1, item 2] must be Object#equals to foo [group 1, item 1]");
return;
label:
staticinvoke <com.google.common.testing.EqualsTesterTest: void fail(java.lang.String)>("should failed because symmetry is broken");
return;
catch junit.framework.AssertionFailedError from label to label with label;
}
public void testTransitivityBrokenInEqualityGroup()
{
java.lang.Throwable v;
java.lang.Object[] v;
com.google.common.testing.EqualsTesterTest$NamedObject v, v, v, v, v, v;
java.lang.String[] v, v, v;
com.google.common.testing.EqualsTester v, v;
com.google.common.testing.EqualsTesterTest v;
v := @this: com.google.common.testing.EqualsTesterTest;
v = new com.google.common.testing.EqualsTester;
specialinvoke v.<com.google.common.testing.EqualsTester: void <init>()>();
v = newarray (java.lang.Object)[3];
v = staticinvoke <com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$NamedObject named(java.lang.String)>("foo");
v = newarray (java.lang.String)[2];
v[0] = "bar";
v[1] = "baz";
v = virtualinvoke v.<com.google.common.testing.EqualsTesterTest$NamedObject: com.google.common.testing.EqualsTesterTest$NamedObject addPeers(java.lang.String[])>(v);
v[0] = v;
v = staticinvoke <com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$NamedObject named(java.lang.String)>("bar");
v = newarray (java.lang.String)[1];
v[0] = "foo";
v = virtualinvoke v.<com.google.common.testing.EqualsTesterTest$NamedObject: com.google.common.testing.EqualsTesterTest$NamedObject addPeers(java.lang.String[])>(v);
v[1] = v;
v = staticinvoke <com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$NamedObject named(java.lang.String)>("baz");
v = newarray (java.lang.String)[1];
v[0] = "foo";
v = virtualinvoke v.<com.google.common.testing.EqualsTesterTest$NamedObject: com.google.common.testing.EqualsTesterTest$NamedObject addPeers(java.lang.String[])>(v);
v[2] = v;
v = virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
label:
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester testEquals()>();
label:
goto label;
label:
v := @caughtexception;
staticinvoke <com.google.common.testing.EqualsTesterTest: void assertErrorMessage(java.lang.Throwable,java.lang.String)>(v, "bar [group 1, item 2] must be Object#equals to baz [group 1, item 3]");
return;
label:
staticinvoke <com.google.common.testing.EqualsTesterTest: void fail(java.lang.String)>("should failed because transitivity is broken");
return;
catch junit.framework.AssertionFailedError from label to label with label;
}
public void testUnequalObjectsInEqualityGroup()
{
java.lang.Throwable v;
java.lang.Object[] v;
com.google.common.testing.EqualsTesterTest v;
com.google.common.testing.EqualsTesterTest$NamedObject v, v;
com.google.common.testing.EqualsTester v, v;
v := @this: com.google.common.testing.EqualsTesterTest;
v = new com.google.common.testing.EqualsTester;
specialinvoke v.<com.google.common.testing.EqualsTester: void <init>()>();
v = newarray (java.lang.Object)[2];
v = staticinvoke <com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$NamedObject named(java.lang.String)>("foo");
v[0] = v;
v = staticinvoke <com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$NamedObject named(java.lang.String)>("bar");
v[1] = v;
v = virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
label:
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester testEquals()>();
label:
goto label;
label:
v := @caughtexception;
staticinvoke <com.google.common.testing.EqualsTesterTest: void assertErrorMessage(java.lang.Throwable,java.lang.String)>(v, "foo [group 1, item 1] must be Object#equals to bar [group 1, item 2]");
return;
label:
staticinvoke <com.google.common.testing.EqualsTesterTest: void fail(java.lang.String)>("should failed because of unequal objects in the same equality group");
return;
catch junit.framework.AssertionFailedError from label to label with label;
}
public void testTransitivityBrokenAcrossEqualityGroups()
{
java.lang.Throwable v;
java.lang.Object[] v, v;
com.google.common.testing.EqualsTesterTest$NamedObject v, v, v, v, v, v, v, v;
java.lang.String[] v, v, v, v;
com.google.common.testing.EqualsTesterTest v;
com.google.common.testing.EqualsTester v, v, v;
v := @this: com.google.common.testing.EqualsTesterTest;
v = new com.google.common.testing.EqualsTester;
specialinvoke v.<com.google.common.testing.EqualsTester: void <init>()>();
v = newarray (java.lang.Object)[2];
v = staticinvoke <com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$NamedObject named(java.lang.String)>("foo");
v = newarray (java.lang.String)[1];
v[0] = "bar";
v = virtualinvoke v.<com.google.common.testing.EqualsTesterTest$NamedObject: com.google.common.testing.EqualsTesterTest$NamedObject addPeers(java.lang.String[])>(v);
v[0] = v;
v = staticinvoke <com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$NamedObject named(java.lang.String)>("bar");
v = newarray (java.lang.String)[2];
v[0] = "foo";
v[1] = "x";
v = virtualinvoke v.<com.google.common.testing.EqualsTesterTest$NamedObject: com.google.common.testing.EqualsTesterTest$NamedObject addPeers(java.lang.String[])>(v);
v[1] = v;
v = virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
v = newarray (java.lang.Object)[2];
v = staticinvoke <com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$NamedObject named(java.lang.String)>("baz");
v = newarray (java.lang.String)[1];
v[0] = "x";
v = virtualinvoke v.<com.google.common.testing.EqualsTesterTest$NamedObject: com.google.common.testing.EqualsTesterTest$NamedObject addPeers(java.lang.String[])>(v);
v[0] = v;
v = staticinvoke <com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$NamedObject named(java.lang.String)>("x");
v = newarray (java.lang.String)[2];
v[0] = "baz";
v[1] = "bar";
v = virtualinvoke v.<com.google.common.testing.EqualsTesterTest$NamedObject: com.google.common.testing.EqualsTesterTest$NamedObject addPeers(java.lang.String[])>(v);
v[1] = v;
v = virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
label:
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester testEquals()>();
label:
goto label;
label:
v := @caughtexception;
staticinvoke <com.google.common.testing.EqualsTesterTest: void assertErrorMessage(java.lang.Throwable,java.lang.String)>(v, "bar [group 1, item 2] must not be Object#equals to x [group 2, item 2]");
return;
label:
staticinvoke <com.google.common.testing.EqualsTesterTest: void fail(java.lang.String)>("should failed because transitivity is broken");
return;
catch junit.framework.AssertionFailedError from label to label with label;
}
public void testEqualityGroups()
{
java.lang.Object[] v, v;
com.google.common.testing.EqualsTesterTest$NamedObject v, v, v, v, v, v;
java.lang.String[] v, v;
com.google.common.testing.EqualsTester v, v, v;
com.google.common.testing.EqualsTesterTest v;
v := @this: com.google.common.testing.EqualsTesterTest;
v = new com.google.common.testing.EqualsTester;
specialinvoke v.<com.google.common.testing.EqualsTester: void <init>()>();
v = newarray (java.lang.Object)[2];
v = staticinvoke <com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$NamedObject named(java.lang.String)>("foo");
v = newarray (java.lang.String)[1];
v[0] = "bar";
v = virtualinvoke v.<com.google.common.testing.EqualsTesterTest$NamedObject: com.google.common.testing.EqualsTesterTest$NamedObject addPeers(java.lang.String[])>(v);
v[0] = v;
v = staticinvoke <com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$NamedObject named(java.lang.String)>("bar");
v = newarray (java.lang.String)[1];
v[0] = "foo";
v = virtualinvoke v.<com.google.common.testing.EqualsTesterTest$NamedObject: com.google.common.testing.EqualsTesterTest$NamedObject addPeers(java.lang.String[])>(v);
v[1] = v;
v = virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
v = newarray (java.lang.Object)[2];
v = staticinvoke <com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$NamedObject named(java.lang.String)>("baz");
v[0] = v;
v = staticinvoke <com.google.common.testing.EqualsTesterTest: com.google.common.testing.EqualsTesterTest$NamedObject named(java.lang.String)>("baz");
v[1] = v;
v = virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester testEquals()>();
return;
}
public void testEqualityBasedOnToString()
{
java.lang.Throwable v;
java.lang.Object[] v;
com.google.common.testing.EqualsTesterTest$EqualsBasedOnToString v;
com.google.common.testing.EqualsTester v, v;
com.google.common.testing.EqualsTesterTest v;
java.lang.String v;
boolean v;
v := @this: com.google.common.testing.EqualsTesterTest;
label:
v = new com.google.common.testing.EqualsTester;
specialinvoke v.<com.google.common.testing.EqualsTester: void <init>()>();
v = newarray (java.lang.Object)[1];
v = new com.google.common.testing.EqualsTesterTest$EqualsBasedOnToString;
specialinvoke v.<com.google.common.testing.EqualsTesterTest$EqualsBasedOnToString: void <init>(java.lang.String)>("foo");
v[0] = v;
v = virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester addEqualityGroup(java.lang.Object[])>(v);
virtualinvoke v.<com.google.common.testing.EqualsTester: com.google.common.testing.EqualsTester testEquals()>();
staticinvoke <com.google.common.testing.EqualsTesterTest: void fail()>();
label:
goto label;
label:
v := @caughtexception;
v = virtualinvoke v.<junit.framework.AssertionFailedError: java.lang.String getMessage()>();
v = virtualinvoke v.<java.lang.String: boolean contains(java.lang.CharSequence)>("toString representation");
staticinvoke <com.google.common.testing.EqualsTesterTest: void assertTrue(boolean)>(v);
label:
return;
catch junit.framework.AssertionFailedError from label to label with label;
}
private static void assertErrorMessage(java.lang.Throwable, java.lang.String)
{
java.lang.Throwable v;
java.lang.String v, v, v, v;
boolean v;
v := @parameter: java.lang.Throwable;
v := @parameter: java.lang.String;
v = virtualinvoke v.<java.lang.Throwable: java.lang.String getMessage()>();
v = virtualinvoke v.<java.lang.String: boolean contains(java.lang.CharSequence)>(v);
if v != 0 goto label;
v = virtualinvoke v.<java.lang.Throwable: java.lang.String getMessage()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String,java.lang.String)>(v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("expected <\u0001> to contain <\u0001>");
staticinvoke <com.google.common.testing.EqualsTesterTest: void fail(java.lang.String)>(v);
label:
return;
}
private static com.google.common.testing.EqualsTesterTest$NamedObject named(java.lang.String)
{
java.lang.String v;
com.google.common.testing.EqualsTesterTest$NamedObject v;
v := @parameter: java.lang.String;
v = new com.google.common.testing.EqualsTesterTest$NamedObject;
specialinvoke v.<com.google.common.testing.EqualsTesterTest$NamedObject: void <init>(java.lang.String)>(v);
return v;
}
}