Skip to content

Commit

Permalink
Merge pull request #225 from akune/fix-224-pull-request
Browse files Browse the repository at this point in the history
Fix 224 pull request
  • Loading branch information
elucash committed Dec 14, 2015
2 parents dc647af + 034e74e commit 8af413f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
@@ -1,6 +1,8 @@
package org.immutables.fixture.modifiable;

import static org.hamcrest.core.IsEqual.equalTo;
import static org.immutables.check.Checkers.*;

import org.junit.Test;

public class ModifiablesTest {
Expand Down Expand Up @@ -81,6 +83,11 @@ public void uninitializedEquals() {
check(c1).not().is(c2);
}

@Test
public void equalsWithDifferenObjectType() {
check(ModifiableCompanion.create()).not().is(equalTo(new Object()));
}

@Test
public void defaults() {
ModifiableStandalone m = ModifiableStandalone.create();
Expand Down
Expand Up @@ -662,7 +662,7 @@ if ([v.name]Value != null) {
@Override
public boolean equals([atNullable]Object another) {
if (this == another) return true;
if (!(this instanceof [equalToType])) return false;
if (!(another instanceof [equalToType])) return false;
[equalToType] o = ([equalToType]) another;
[if type.mandatoryAttributes]
if (![isInitialized type]() || !o.[isInitialized type]()) {
Expand Down

0 comments on commit 8af413f

Please sign in to comment.