Reformat whole codebase using Android Studio
This commit is contained in:
parent
d5322667d5
commit
c15913c1ab
161 changed files with 15124 additions and 18537 deletions
|
|
@ -3,50 +3,39 @@ package btools.codec;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class LinkedListContainerTest
|
||||
{
|
||||
public class LinkedListContainerTest {
|
||||
@Test
|
||||
public void linkedListTest1()
|
||||
{
|
||||
public void linkedListTest1() {
|
||||
int nlists = 553;
|
||||
|
||||
LinkedListContainer llc = new LinkedListContainer( nlists, null );
|
||||
LinkedListContainer llc = new LinkedListContainer(nlists, null);
|
||||
|
||||
for ( int ln = 0; ln < nlists; ln++ )
|
||||
{
|
||||
for ( int i = 0; i < 10; i++ )
|
||||
{
|
||||
llc.addDataElement( ln, ln * i );
|
||||
for (int ln = 0; ln < nlists; ln++) {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
llc.addDataElement(ln, ln * i);
|
||||
}
|
||||
}
|
||||
|
||||
for ( int i = 0; i < 10; i++ )
|
||||
{
|
||||
for ( int ln = 0; ln < nlists; ln++ )
|
||||
{
|
||||
llc.addDataElement( ln, ln * i );
|
||||
for (int i = 0; i < 10; i++) {
|
||||
for (int ln = 0; ln < nlists; ln++) {
|
||||
llc.addDataElement(ln, ln * i);
|
||||
}
|
||||
}
|
||||
|
||||
for ( int ln = 0; ln < nlists; ln++ )
|
||||
{
|
||||
int cnt = llc.initList( ln );
|
||||
Assert.assertTrue( "list size test", cnt == 20 );
|
||||
for (int ln = 0; ln < nlists; ln++) {
|
||||
int cnt = llc.initList(ln);
|
||||
Assert.assertTrue("list size test", cnt == 20);
|
||||
|
||||
for ( int i = 19; i >= 0; i-- )
|
||||
{
|
||||
for (int i = 19; i >= 0; i--) {
|
||||
int data = llc.getDataElement();
|
||||
Assert.assertTrue( "data value test", data == ln * ( i % 10 ) );
|
||||
Assert.assertTrue("data value test", data == ln * (i % 10));
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
try {
|
||||
llc.getDataElement();
|
||||
Assert.fail( "no more elements expected" );
|
||||
}
|
||||
catch (IllegalArgumentException e)
|
||||
{
|
||||
Assert.fail("no more elements expected");
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue