mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-12 18:25:51 +00:00
MonetaryFormatTest, BtcFormatTest: Disable locale-sensitve tests that surface non-determinism between OpenJDK versions.
This commit is contained in:
parent
4fd144d71d
commit
09deb02aec
@ -17,6 +17,7 @@
|
|||||||
package org.bitcoinj.utils;
|
package org.bitcoinj.utils;
|
||||||
|
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.junit.runners.Parameterized;
|
import org.junit.runners.Parameterized;
|
||||||
@ -71,6 +72,7 @@ public class BtcFormatTest {
|
|||||||
assertEquals("µ฿0.01", usFormat.format(1));
|
assertEquals("µ฿0.01", usFormat.format(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Ignore("non-determinism between OpenJDK versions")
|
||||||
@Test
|
@Test
|
||||||
public void suffixTest() {
|
public void suffixTest() {
|
||||||
BtcFormat deFormat = BtcFormat.getSymbolInstance(Locale.GERMANY);
|
BtcFormat deFormat = BtcFormat.getSymbolInstance(Locale.GERMANY);
|
||||||
@ -148,6 +150,7 @@ public class BtcFormatTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Ignore("non-determinism between OpenJDK versions")
|
||||||
@Test
|
@Test
|
||||||
public void argumentTypeTest() {
|
public void argumentTypeTest() {
|
||||||
BtcFormat usFormat = BtcFormat.getSymbolInstance(Locale.US);
|
BtcFormat usFormat = BtcFormat.getSymbolInstance(Locale.US);
|
||||||
@ -282,6 +285,7 @@ public class BtcFormatTest {
|
|||||||
assertEquals(fa.hashCode(), fb.hashCode());
|
assertEquals(fa.hashCode(), fb.hashCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Ignore("non-determinism between OpenJDK versions")
|
||||||
@Test
|
@Test
|
||||||
public void parseTest() throws java.text.ParseException {
|
public void parseTest() throws java.text.ParseException {
|
||||||
BtcFormat us = BtcFormat.getSymbolInstance(Locale.US);
|
BtcFormat us = BtcFormat.getSymbolInstance(Locale.US);
|
||||||
@ -664,6 +668,7 @@ public class BtcFormatTest {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Ignore("non-determinism between OpenJDK versions")
|
||||||
@Test
|
@Test
|
||||||
public void currencyCodeTest() {
|
public void currencyCodeTest() {
|
||||||
/* Insert needed space AFTER currency-code */
|
/* Insert needed space AFTER currency-code */
|
||||||
@ -1157,6 +1162,7 @@ public class BtcFormatTest {
|
|||||||
assertEquals("11.223344556677", megaFormat.format(Coin.valueOf(1122334455667700l), 0, REPEATING_TRIPLETS));
|
assertEquals("11.223344556677", megaFormat.format(Coin.valueOf(1122334455667700l), 0, REPEATING_TRIPLETS));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Ignore("non-determinism between OpenJDK versions")
|
||||||
@Test
|
@Test
|
||||||
public void negativeTest() throws Exception {
|
public void negativeTest() throws Exception {
|
||||||
assertEquals("-1,00 BTC", BtcFormat.getInstance(FRANCE).format(COIN.multiply(-1)));
|
assertEquals("-1,00 BTC", BtcFormat.getInstance(FRANCE).format(COIN.multiply(-1)));
|
||||||
@ -1266,6 +1272,7 @@ public class BtcFormatTest {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Ignore("non-determinism between OpenJDK versions")
|
||||||
@Test
|
@Test
|
||||||
public void attributeTest() throws Exception {
|
public void attributeTest() throws Exception {
|
||||||
String codePat = BtcFormat.getCodeInstance(Locale.US).pattern();
|
String codePat = BtcFormat.getCodeInstance(Locale.US).pattern();
|
||||||
@ -1281,6 +1288,7 @@ public class BtcFormatTest {
|
|||||||
assertEquals('๐', BtcFormat.getInstance(new Locale("th","TH","TH")).symbols().getZeroDigit());
|
assertEquals('๐', BtcFormat.getInstance(new Locale("th","TH","TH")).symbols().getZeroDigit());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Ignore("non-determinism between OpenJDK versions")
|
||||||
@Test
|
@Test
|
||||||
public void toStringTest() {
|
public void toStringTest() {
|
||||||
assertEquals("Auto-format ฿#,##0.00;(฿#,##0.00)", BtcFormat.getSymbolInstance(Locale.US).toString());
|
assertEquals("Auto-format ฿#,##0.00;(฿#,##0.00)", BtcFormat.getSymbolInstance(Locale.US).toString());
|
||||||
@ -1330,6 +1338,7 @@ public class BtcFormatTest {
|
|||||||
assertEquals("mBTC 1000.000", f.format(COIN));
|
assertEquals("mBTC 1000.000", f.format(COIN));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Ignore("non-determinism between OpenJDK versions")
|
||||||
@Test
|
@Test
|
||||||
public void builderTest() {
|
public void builderTest() {
|
||||||
Locale locale;
|
Locale locale;
|
||||||
|
@ -24,6 +24,7 @@ import static org.junit.Assert.assertEquals;
|
|||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
@ -251,6 +252,12 @@ public class MonetaryFormatTest {
|
|||||||
final Coin value = Coin.valueOf(-1234567890l);
|
final Coin value = Coin.valueOf(-1234567890l);
|
||||||
assertEquals("-12.34567890", NO_CODE.withLocale(Locale.US).format(value).toString());
|
assertEquals("-12.34567890", NO_CODE.withLocale(Locale.US).format(value).toString());
|
||||||
assertEquals("-12,34567890", NO_CODE.withLocale(Locale.GERMANY).format(value).toString());
|
assertEquals("-12,34567890", NO_CODE.withLocale(Locale.GERMANY).format(value).toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Ignore("non-determinism between OpenJDK versions")
|
||||||
|
@Test
|
||||||
|
public void withLocaleDevanagari() throws Exception {
|
||||||
|
final Coin value = Coin.valueOf(-1234567890l);
|
||||||
assertEquals("-१२.३४५६७८९०", NO_CODE.withLocale(new Locale("hi", "IN")).format(value).toString()); // Devanagari
|
assertEquals("-१२.३४५६७८९०", NO_CODE.withLocale(new Locale("hi", "IN")).format(value).toString()); // Devanagari
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user