test code formatting

This commit is contained in:
Hervé Boutemy 2014-08-19 17:17:05 +02:00
parent ca2b26ac5d
commit 1ba9a6ffe0
1 changed files with 8 additions and 7 deletions

View File

@ -21,7 +21,8 @@ package org.apache.maven.cli;
import junit.framework.TestCase;
public class MavenCliTest extends TestCase
public class MavenCliTest
extends TestCase
{
private MavenCli cli;
@ -34,16 +35,16 @@ public class MavenCliTest extends TestCase
{
int cores = Runtime.getRuntime().availableProcessors();
// -T2.2C
assertEquals((int)(cores * 2.2), cli.calculateDegreeOfConcurrencyWithCoreMultiplier("C2.2"));
assertEquals( (int) ( cores * 2.2 ), cli.calculateDegreeOfConcurrencyWithCoreMultiplier( "C2.2" ) );
// -TC2.2
assertEquals((int)(cores * 2.2), cli.calculateDegreeOfConcurrencyWithCoreMultiplier("2.2C"));
assertEquals( (int) ( cores * 2.2 ), cli.calculateDegreeOfConcurrencyWithCoreMultiplier( "2.2C" ) );
try
{
cli.calculateDegreeOfConcurrencyWithCoreMultiplier("CXXX");
fail("Should have failed with a NumberFormatException");
cli.calculateDegreeOfConcurrencyWithCoreMultiplier( "CXXX" );
fail( "Should have failed with a NumberFormatException" );
}
catch( NumberFormatException e)
catch ( NumberFormatException e )
{
// carry on
}