Remove unnecessary testing comments (closes #305)

This commit is contained in:
Haoliang Quan 2017-11-04 22:04:24 -07:00 committed by pascalschumacher
parent 425d8085cf
commit 20de433aa2
5 changed files with 0 additions and 39 deletions

View File

@ -269,7 +269,6 @@ public static Fraction getFraction(double value) {
double delta1, delta2 = Double.MAX_VALUE;
double fraction;
int i = 1;
// System.out.println("---");
do {
delta1 = delta2;
a2 = (int) (x1 / y1);
@ -279,7 +278,6 @@ public static Fraction getFraction(double value) {
denom2 = a1 * denom1 + denom0;
fraction = (double) numer2 / (double) denom2;
delta2 = Math.abs(value - fraction);
// System.out.println(numer2 + " " + denom2 + " " + fraction + " " + delta2 + " " + y1);
a1 = a2;
x1 = x2;
y1 = y2;
@ -288,7 +286,6 @@ public static Fraction getFraction(double value) {
numer1 = numer2;
denom1 = denom2;
i++;
// System.out.println(">>" + delta1 +" "+ delta2+" "+(delta1 > delta2)+" "+i+" "+denom2);
} while (delta1 > delta2 && denom2 <= 10000 && denom2 > 0 && i < 25);
if (i == 25) {
throw new ArithmeticException("Unable to convert double to fraction");

View File

@ -102,21 +102,15 @@ private void run() {
long start;
start = System.currentTimeMillis();
this.printlnTotal("Do nothing", start);
//System.out.println("Warming up...");
run_CharUtils_isAsciiNumeric(WARM_UP);
//System.out.println("Measuring...");
start = System.currentTimeMillis();
run_CharUtils_isAsciiNumeric(COUNT);
this.printlnTotal("run_CharUtils_isAsciiNumeric", start);
//System.out.println("Warming up...");
run_inlined_CharUtils_isAsciiNumeric(WARM_UP);
//System.out.println("Measuring...");
start = System.currentTimeMillis();
run_inlined_CharUtils_isAsciiNumeric(COUNT);
this.printlnTotal("run_inlined_CharUtils_isAsciiNumeric", start);
//System.out.println("Warming up...");
run_CharSet(WARM_UP);
//System.out.println("Measuring...");
start = System.currentTimeMillis();
run_CharSet(COUNT);
this.printlnTotal("run_CharSet", start);

View File

@ -2371,7 +2371,6 @@ public void testDifferenceAt_StringString() {
assertEquals(7, StringUtils.indexOfDifference("i am a machine", "i am a robot"));
assertEquals(-1, StringUtils.indexOfDifference("foo", "foo"));
assertEquals(0, StringUtils.indexOfDifference("i am a robot", "you are a robot"));
//System.out.println("indexOfDiff: " + StringUtils.indexOfDifference("i am a robot", "not machine"));
}
//-----------------------------------------------------------------------

View File

@ -370,7 +370,6 @@ private void checkBuiltInFormat(final String pattern, final Map<String, ?> regis
buffer.append(locale);
buffer.append("]");
final MessageFormat mf = createMessageFormat(pattern, locale);
// System.out.println(buffer + ", result=[" + mf.format(args) +"]");
ExtendedMessageFormat emf = null;
if (locale == null) {
emf = new ExtendedMessageFormat(pattern);

View File

@ -186,34 +186,6 @@ public void testSMTP() {
timeZone, june);
}
/*
public void testLang312() {
String pattern = "dd/MM/yyyy";
String expected = "19/04/1948";
TimeZone timeZone = TimeZone.getTimeZone("CET");
Locale locale = Locale.GERMANY;
// show Calendar is good
Calendar cal = Calendar.getInstance(timeZone, locale);
cal.set(1948, 3, 19);
assertEquals(expected, DateFormatUtils.format( cal.getTime(), pattern, timeZone, locale ) );
Date date = new Date(48, 3, 19);
// test JDK
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(pattern, locale);
sdf.setTimeZone(timeZone);
// There's nothing we can do if the JDK fails, so just going to print a warning in this case
// assertEquals(expected, sdf.format( date ) );
if( ! expected.equals( sdf.format( date ) ) ) {
System.out.println("WARNING: JDK test failed - testLang312()");
}
// test Commons
assertEquals(expected, DateFormatUtils.format( date, pattern, timeZone, locale ) );
}
*/
@Test
public void testLANG1000() throws Exception {
final String date = "2013-11-18T12:48:05Z";