Skip to content

Commit

Permalink
sptbugs
Browse files Browse the repository at this point in the history
  • Loading branch information
bobjacobsen committed Apr 29, 2020
1 parent e5f28a5 commit a5d014d
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions java/test/jmri/jmrit/display/layoutEditor/TrackSegmentTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public void testConstructionLinesRead () {
Assert.assertFalse("HIDECON", trackSegment.isShowConstructionLines());
Assert.assertTrue("HIDECON", trackSegment.hideConstructionLines());

trackSegment.showConstructionLine = trackSegment.SHOWCON;
trackSegment.showConstructionLine = TrackSegment.SHOWCON;
Assert.assertTrue("SHOWCON", trackSegment.isShowConstructionLines());
Assert.assertFalse("SHOWCON", trackSegment.hideConstructionLines());

trackSegment.showConstructionLine = trackSegment.SHOWCON | TrackSegment.HIDECON | TrackSegment.HIDECONALL;
trackSegment.showConstructionLine = TrackSegment.SHOWCON | TrackSegment.HIDECON | TrackSegment.HIDECONALL;
Assert.assertFalse("all", trackSegment.isShowConstructionLines());
Assert.assertFalse("all", trackSegment.hideConstructionLines());

Expand All @@ -61,8 +61,8 @@ public void testConstructionLinesRead () {
@Test
public void hideConstructionLinesOfInt() {
trackSegment.showConstructionLine = 0;
trackSegment.hideConstructionLines(trackSegment.SHOWCON);
Assert.assertEquals(trackSegment.showConstructionLine, trackSegment.SHOWCON);
trackSegment.hideConstructionLines(TrackSegment.SHOWCON);
Assert.assertEquals(trackSegment.showConstructionLine, TrackSegment.SHOWCON);

trackSegment.showConstructionLine = 0;
trackSegment.hideConstructionLines(TrackSegment.HIDECON);
Expand All @@ -74,23 +74,23 @@ public void hideConstructionLinesOfInt() {

// ----

trackSegment.showConstructionLine = trackSegment.SHOWCON;
trackSegment.hideConstructionLines(trackSegment.SHOWCON);
Assert.assertEquals(trackSegment.showConstructionLine, trackSegment.SHOWCON);
trackSegment.showConstructionLine = TrackSegment.SHOWCON;
trackSegment.hideConstructionLines(TrackSegment.SHOWCON);
Assert.assertEquals(trackSegment.showConstructionLine, TrackSegment.SHOWCON);

trackSegment.showConstructionLine = trackSegment.SHOWCON;
trackSegment.showConstructionLine = TrackSegment.SHOWCON;
trackSegment.hideConstructionLines(TrackSegment.HIDECON);
Assert.assertEquals(trackSegment.showConstructionLine, TrackSegment.HIDECON);

trackSegment.showConstructionLine = trackSegment.SHOWCON;
trackSegment.showConstructionLine = TrackSegment.SHOWCON;
trackSegment.hideConstructionLines(TrackSegment.HIDECONALL);
Assert.assertEquals(trackSegment.showConstructionLine, trackSegment.SHOWCON | TrackSegment.HIDECONALL);
Assert.assertEquals(trackSegment.showConstructionLine, TrackSegment.SHOWCON | TrackSegment.HIDECONALL);

// ----

trackSegment.showConstructionLine = TrackSegment.HIDECON;
trackSegment.hideConstructionLines(trackSegment.SHOWCON);
Assert.assertEquals(trackSegment.showConstructionLine, trackSegment.SHOWCON);
trackSegment.hideConstructionLines(TrackSegment.SHOWCON);
Assert.assertEquals(trackSegment.showConstructionLine, TrackSegment.SHOWCON);

trackSegment.showConstructionLine = TrackSegment.HIDECON;
trackSegment.hideConstructionLines(TrackSegment.HIDECON);
Expand All @@ -103,7 +103,7 @@ public void hideConstructionLinesOfInt() {
// ----

trackSegment.showConstructionLine = TrackSegment.HIDECONALL;
trackSegment.hideConstructionLines(trackSegment.SHOWCON);
trackSegment.hideConstructionLines(TrackSegment.SHOWCON);
Assert.assertEquals(trackSegment.showConstructionLine, 0);

trackSegment.showConstructionLine = TrackSegment.HIDECONALL;
Expand All @@ -117,7 +117,7 @@ public void hideConstructionLinesOfInt() {
// ----

trackSegment.showConstructionLine = TrackSegment.HIDECON |TrackSegment.HIDECONALL;
trackSegment.hideConstructionLines(trackSegment.SHOWCON);
trackSegment.hideConstructionLines(TrackSegment.SHOWCON);
Assert.assertEquals(trackSegment.showConstructionLine, TrackSegment.HIDECON);

trackSegment.showConstructionLine = TrackSegment.HIDECON |TrackSegment.HIDECONALL;
Expand All @@ -130,45 +130,45 @@ public void hideConstructionLinesOfInt() {

// ----

trackSegment.showConstructionLine = trackSegment.SHOWCON | TrackSegment.HIDECONALL;
trackSegment.hideConstructionLines(trackSegment.SHOWCON);
Assert.assertEquals(trackSegment.showConstructionLine, trackSegment.SHOWCON );
trackSegment.showConstructionLine = TrackSegment.SHOWCON | TrackSegment.HIDECONALL;
trackSegment.hideConstructionLines(TrackSegment.SHOWCON);
Assert.assertEquals(trackSegment.showConstructionLine, TrackSegment.SHOWCON );

trackSegment.showConstructionLine = trackSegment.SHOWCON | TrackSegment.HIDECONALL;
trackSegment.showConstructionLine = TrackSegment.SHOWCON | TrackSegment.HIDECONALL;
trackSegment.hideConstructionLines(TrackSegment.HIDECON);
Assert.assertEquals(trackSegment.showConstructionLine, TrackSegment.HIDECON);

trackSegment.showConstructionLine = trackSegment.SHOWCON | TrackSegment.HIDECONALL;
trackSegment.showConstructionLine = TrackSegment.SHOWCON | TrackSegment.HIDECONALL;
trackSegment.hideConstructionLines(TrackSegment.HIDECONALL);
Assert.assertEquals(trackSegment.showConstructionLine, trackSegment.SHOWCON |TrackSegment.HIDECONALL);
Assert.assertEquals(trackSegment.showConstructionLine, TrackSegment.SHOWCON |TrackSegment.HIDECONALL);

// ----

trackSegment.showConstructionLine = trackSegment.SHOWCON | TrackSegment.HIDECON;
trackSegment.hideConstructionLines(trackSegment.SHOWCON);
Assert.assertEquals(trackSegment.showConstructionLine, trackSegment.SHOWCON);
trackSegment.showConstructionLine = TrackSegment.SHOWCON | TrackSegment.HIDECON;
trackSegment.hideConstructionLines(TrackSegment.SHOWCON);
Assert.assertEquals(trackSegment.showConstructionLine, TrackSegment.SHOWCON);

trackSegment.showConstructionLine = trackSegment.SHOWCON | TrackSegment.HIDECON;
trackSegment.showConstructionLine = TrackSegment.SHOWCON | TrackSegment.HIDECON;
trackSegment.hideConstructionLines(TrackSegment.HIDECON);
Assert.assertEquals(trackSegment.showConstructionLine, TrackSegment.HIDECON);

trackSegment.showConstructionLine = trackSegment.SHOWCON | TrackSegment.HIDECON;
trackSegment.showConstructionLine = TrackSegment.SHOWCON | TrackSegment.HIDECON;
trackSegment.hideConstructionLines(TrackSegment.HIDECONALL);
Assert.assertEquals(trackSegment.showConstructionLine, trackSegment.SHOWCON | TrackSegment.HIDECON |TrackSegment.HIDECONALL);
Assert.assertEquals(trackSegment.showConstructionLine, TrackSegment.SHOWCON | TrackSegment.HIDECON |TrackSegment.HIDECONALL);

// ----

trackSegment.showConstructionLine = trackSegment.SHOWCON | TrackSegment.HIDECON |TrackSegment.HIDECONALL;
trackSegment.hideConstructionLines(trackSegment.SHOWCON);
Assert.assertEquals(trackSegment.showConstructionLine, trackSegment.SHOWCON | TrackSegment.HIDECON );
trackSegment.showConstructionLine = TrackSegment.SHOWCON | TrackSegment.HIDECON |TrackSegment.HIDECONALL;
trackSegment.hideConstructionLines(TrackSegment.SHOWCON);
Assert.assertEquals(trackSegment.showConstructionLine, TrackSegment.SHOWCON | TrackSegment.HIDECON );

trackSegment.showConstructionLine = trackSegment.SHOWCON | TrackSegment.HIDECON |TrackSegment.HIDECONALL;
trackSegment.showConstructionLine = TrackSegment.SHOWCON | TrackSegment.HIDECON |TrackSegment.HIDECONALL;
trackSegment.hideConstructionLines(TrackSegment.HIDECON);
Assert.assertEquals(trackSegment.showConstructionLine, TrackSegment.HIDECON);

trackSegment.showConstructionLine = trackSegment.SHOWCON | TrackSegment.HIDECON |TrackSegment.HIDECONALL;
trackSegment.showConstructionLine = TrackSegment.SHOWCON | TrackSegment.HIDECON |TrackSegment.HIDECONALL;
trackSegment.hideConstructionLines(TrackSegment.HIDECONALL);
Assert.assertEquals(trackSegment.showConstructionLine, trackSegment.SHOWCON | TrackSegment.HIDECON |TrackSegment.HIDECONALL);
Assert.assertEquals(trackSegment.showConstructionLine, TrackSegment.SHOWCON | TrackSegment.HIDECON |TrackSegment.HIDECONALL);
}

@Test
Expand Down

0 comments on commit a5d014d

Please sign in to comment.