Skip to content

Commit

Permalink
test: added phasetype cloning test (#700)
Browse files Browse the repository at this point in the history
  • Loading branch information
asmfstatoil authored May 22, 2023
1 parent 42662b1 commit e54decb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/neqsim/thermo/phase/Phase.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public Phase clone() {
for (int i = 0; i < numberOfComponents; i++) {
clonedPhase.componentArray[i] = this.componentArray[i].clone();
}
// System.out.println("cloed length: " + componentArray.length);
// System.out.println("cloned length: " + componentArray.length);
if (physicalPropertyHandler != null) {
clonedPhase.physicalPropertyHandler = this.physicalPropertyHandler.clone();
}
Expand Down
5 changes: 5 additions & 0 deletions src/test/java/neqsim/thermo/phase/PhaseSrkEosTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,10 @@ void testClone() {
p2 = p.clone();
Assertions.assertEquals(p.getType(), p2.getType());
}

p.setType(PhaseType.GAS);
p2.setType(PhaseType.LIQUID);

Assertions.assertNotEquals(p.getType(), p2.getType());
}
}

0 comments on commit e54decb

Please sign in to comment.