From 48031596c9dbc28c47dad924bb53ce5e5d67f6bf Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 30 Aug 2017 12:49:43 +0100 Subject: [PATCH] JAL-2685 tweaks to output spacing, updated TestAlignSeq for changes --- src/jalview/analysis/AlignSeq.java | 2 +- test/jalview/analysis/TestAlignSeq.java | 10 +++++----- test/jalview/gui/PairwiseAlignmentPanelTest.java | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/jalview/analysis/AlignSeq.java b/src/jalview/analysis/AlignSeq.java index 15ea2fc..1b2578e 100755 --- a/src/jalview/analysis/AlignSeq.java +++ b/src/jalview/analysis/AlignSeq.java @@ -561,7 +561,7 @@ public class AlignSeq } } - output.append(NEWLINE);// .append(NEWLINE); + output.append(NEWLINE).append(NEWLINE); } pid = pid / (aseq1.length - count) * 100; diff --git a/test/jalview/analysis/TestAlignSeq.java b/test/jalview/analysis/TestAlignSeq.java index 70e59c5..e2e5594 100644 --- a/test/jalview/analysis/TestAlignSeq.java +++ b/test/jalview/analysis/TestAlignSeq.java @@ -64,7 +64,7 @@ public class TestAlignSeq s2 = new Sequence("Seq2", "ASDFA"); s2.setStart(5); s2.setEnd(9); - s3 = new Sequence("Seq1", "SDFAQQQSSS"); + s3 = new Sequence("Seq3", "SDFAQQQSSS"); } @@ -125,10 +125,10 @@ public class TestAlignSeq }; as.printAlignment(ps); - String expected = "Score = 320.0\nLength of alignment = 10\nSequence Seq1 : 3 - 18 (Sequence length = 14)\nSequence Seq1 : 1 - 10 (Sequence length = 10)\n\n" - + "Seq1 SDFAQQQRRR\n" - + " ||||||| \n" - + "Seq1 SDFAQQQSSS\n\n" + "Percentage ID = 70.00\n"; + String expected = "Score = 320.0\nLength of alignment = 10\nSequence Seq1/4-13 (Sequence length = 14)\nSequence Seq3/1-10 (Sequence length = 10)\n\n" + + "Seq1/4-13 SDFAQQQRRR\n" + + " ||||||| \n" + + "Seq3/1-10 SDFAQQQSSS\n\n" + "Percentage ID = 70.00\n\n"; assertEquals(expected, baos.toString()); } } diff --git a/test/jalview/gui/PairwiseAlignmentPanelTest.java b/test/jalview/gui/PairwiseAlignmentPanelTest.java index 4d09f43..3322ee8 100644 --- a/test/jalview/gui/PairwiseAlignmentPanelTest.java +++ b/test/jalview/gui/PairwiseAlignmentPanelTest.java @@ -42,7 +42,7 @@ public class PairwiseAlignmentPanelTest + "Sequence FER1_PEA/29-32 (Sequence length = 7)\n" + "Sequence Q93XJ9_SOLTU/23-26 (Sequence length = 7)\n\n" + " FER1_PEA/29-32 TKAF\n" + " ||.\n" - + "Q93XJ9_SOLTU/23-26 LKAI\n" + "Percentage ID = 50.00\n\n"; + + "Q93XJ9_SOLTU/23-26 LKAI\n\n" + "Percentage ID = 50.00\n\n"; assertEquals(text, expected); } @@ -67,7 +67,7 @@ public class PairwiseAlignmentPanelTest + "Sequence FER1_PEA/29-32 (Sequence length = 7)\n" + "Sequence Q93XJ9_SOLTU/23-26 (Sequence length = 7)\n\n" + " FER1_PEA/29-32 TKAF\n" + " ||.\n" - + "Q93XJ9_SOLTU/23-26 LKAI\n" + "Percentage ID = 50.00\n\n"; + + "Q93XJ9_SOLTU/23-26 LKAI\n\n" + "Percentage ID = 50.00\n\n"; assertEquals(text, expected); } } -- 1.7.10.2