mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 19:42:17 +02:00
написал Intern к стрингам в файле ZLOptionValue, кажется этого хватит
исправил тесты на ZLColor (кстати Николай Михайлович, Вы сами мне говорили что компоненты цвета давайте хранить как int, и сами же исправили потом на short =)) git-svn-id: https://only.mawhrin.net/repos/FBReaderJ/trunk@216 6a642e6f-84f6-412e-ac94-c4a38d5a04b0
This commit is contained in:
parent
b457bde1ec
commit
f193ed906d
3 changed files with 6 additions and 10 deletions
|
@ -6,13 +6,13 @@ public class ZLOptionValue {
|
|||
private String myName = "";
|
||||
|
||||
public ZLOptionValue(String name, String value, String category) {
|
||||
myValue = value;
|
||||
myCategory = category;
|
||||
myName = name;
|
||||
myValue = value.intern();
|
||||
myCategory = category.intern();
|
||||
myName = name.intern();
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
myValue = value;
|
||||
myValue = value.intern();
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
|
|
|
@ -32,7 +32,7 @@ public class ModelTests extends TestCase{
|
|||
private ZLBooleanOption myBooleanOption;
|
||||
private ZLStringOption myStringOption;
|
||||
|
||||
private final long myDefaultColor = 176255000L;
|
||||
private final long myDefaultColor = 11599616;
|
||||
private final long myDefaultIntRange = 75L;
|
||||
private final long myDefaultInt = 15L;
|
||||
private final ZLBoolean3 myDefaultBoolean3 = ZLBoolean3.B3_UNDEFINED;
|
||||
|
|
|
@ -18,10 +18,6 @@ public class UtilTests extends TestCase {
|
|||
myColor = new ZLColor ((short)176, (short)255, (short)0);
|
||||
}
|
||||
|
||||
public void test01_toString(){
|
||||
assertEquals(myColor.toString(), "176,255,0");
|
||||
}
|
||||
|
||||
public void test01_equals(){
|
||||
ZLColor zlc = new ZLColor ((short)176, (short)255, (short)0);
|
||||
assertTrue(zlc.equals(myColor));
|
||||
|
@ -38,6 +34,6 @@ public class UtilTests extends TestCase {
|
|||
}
|
||||
|
||||
public void test01_getIntValue(){
|
||||
assertEquals(myColor.getIntValue(), 176255000L);
|
||||
assertEquals(myColor.getIntValue(), 11599616);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue