From 065aabb4c7dc81aed595099ae64e00be4055e89e Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 26 Jun 2019 11:55:26 +0100 Subject: [PATCH] JAL-3330 test to verify sub/attributeName array is not shared between multiple instances after copy-via-copy constructor --- test/jalview/schemes/FeatureColourTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/jalview/schemes/FeatureColourTest.java b/test/jalview/schemes/FeatureColourTest.java index 52ca360..dae70f7 100644 --- a/test/jalview/schemes/FeatureColourTest.java +++ b/test/jalview/schemes/FeatureColourTest.java @@ -173,6 +173,13 @@ public class FeatureColourTest assertEquals(Color.yellow, fc1.getColour()); assertEquals(10f, fc1.getMin()); assertEquals(20f, fc1.getMax()); + + /* + * modify original attribute label and check that copy doesn't change + */ + fc.setAttributeName("MAF", "AF"); + assertArrayEquals(new String[] { "AF" }, fc1.getAttributeName()); + } @Test(groups = { "Functional" }) -- 1.7.10.2