-
Notifications
You must be signed in to change notification settings - Fork 641
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from BlindingDark/master
第 26 组提交
- Loading branch information
Showing
125 changed files
with
7,743 additions
and
732 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Junit4"/> | ||
<classpathentry kind="lib" path="lib/jdom-2.0.6.jar"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
/bin | ||
/.project/.classpath | ||
/bin | ||
/.project/.classpath | ||
/.settings | ||
/lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>1515345281Learning</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
浅谈CPU,内存,硬盘,指令之间的关系http://blog.csdn.net/sjshenjian/article/details/68946823 |
138 changes: 69 additions & 69 deletions
138
group26/1515345281/src/week1/collection/test/ArrayListTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,69 @@ | ||
package week1.test; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
import org.junit.Test; | ||
|
||
import week1.collection.ArrayList; | ||
import week1.collection.Iterator; | ||
|
||
public class ArrayListTest { | ||
|
||
private ArrayList list=new ArrayList(); | ||
|
||
@Test | ||
public void testAddObject(){ | ||
list.add(1); | ||
assertEquals(1 , list.get(0)); | ||
} | ||
|
||
@Test | ||
public void testAddIndexObject(){ | ||
list.add("aa"); | ||
list.add("bb"); | ||
list.add(0,"cc"); | ||
assertEquals("cc",list.get(0)); | ||
try{ | ||
list.add(-1,"pp"); | ||
fail("- can't be index"); | ||
|
||
list.add(list.size()+100,"bb"); | ||
fail("index should <= size"); | ||
|
||
}catch(Exception ex){ | ||
|
||
} | ||
} | ||
|
||
@Test | ||
public void testGetObject(){ | ||
list.add(1); | ||
assertEquals(1,list.get(0)); | ||
} | ||
|
||
@Test | ||
public void testRemoveObject(){ | ||
list.add(1); | ||
list.add(2); | ||
list.add(3); | ||
list.remove(0); | ||
list.remove(2); | ||
assertEquals(2,list.get(0)); | ||
} | ||
|
||
@Test | ||
public void testSize(){ | ||
assertEquals(0,list.size()); | ||
} | ||
|
||
@Test | ||
public void testIterator(){ | ||
list.add(1); | ||
list.add(2); | ||
list.add(3); | ||
Iterator it=list.iterator(); | ||
while(it.hasNext()){ | ||
System.out.println(it.next()); | ||
} | ||
} | ||
} | ||
package week1.collection.test; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
import org.junit.Test; | ||
|
||
import week1.collection.ArrayList; | ||
import week1.collection.Iterator; | ||
|
||
public class ArrayListTest { | ||
|
||
private ArrayList list=new ArrayList(); | ||
|
||
@Test | ||
public void testAddObject(){ | ||
list.add(1); | ||
assertEquals(1 , list.get(0)); | ||
} | ||
|
||
@Test | ||
public void testAddIndexObject(){ | ||
list.add("aa"); | ||
list.add("bb"); | ||
list.add(0,"cc"); | ||
assertEquals("cc",list.get(0)); | ||
try{ | ||
list.add(-1,"pp"); | ||
fail("- can't be index"); | ||
|
||
list.add(list.size()+100,"bb"); | ||
fail("index should <= size"); | ||
|
||
}catch(Exception ex){ | ||
|
||
} | ||
} | ||
|
||
@Test | ||
public void testGetObject(){ | ||
list.add(1); | ||
assertEquals(1,list.get(0)); | ||
} | ||
|
||
@Test | ||
public void testRemoveObject(){ | ||
list.add(1); | ||
list.add(2); | ||
list.add(3); | ||
list.remove(0); | ||
list.remove(2); | ||
assertEquals(2,list.get(0)); | ||
} | ||
|
||
@Test | ||
public void testSize(){ | ||
assertEquals(0,list.size()); | ||
} | ||
|
||
@Test | ||
public void testIterator(){ | ||
list.add(1); | ||
list.add(2); | ||
list.add(3); | ||
Iterator it=list.iterator(); | ||
while(it.hasNext()){ | ||
System.out.println(it.next()); | ||
} | ||
} | ||
} |
46 changes: 23 additions & 23 deletions
46
group26/1515345281/src/week1/collection/test/BinarySearchTreeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
package week1.test; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
import org.junit.Test; | ||
|
||
import week1.collection.BinaryTreeNode; | ||
|
||
public class BinarySearchTreeTest { | ||
|
||
private BinaryTreeNode root=new BinaryTreeNode(5); | ||
|
||
@Test | ||
public void testInsert(){ | ||
root.insert(2); | ||
root.insert(2); | ||
root.insert(7); | ||
root.insert(1); | ||
root.insert(4); | ||
root.insert(3); | ||
assertEquals(3,root.getLeft().getRight().getLeft().getData()); | ||
} | ||
} | ||
package week1.collection.test; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
import org.junit.Test; | ||
|
||
import week1.collection.BinaryTreeNode; | ||
|
||
public class BinarySearchTreeTest { | ||
|
||
private BinaryTreeNode root=new BinaryTreeNode(5); | ||
|
||
@Test | ||
public void testInsert(){ | ||
root.insert(2); | ||
root.insert(2); | ||
root.insert(7); | ||
root.insert(1); | ||
root.insert(4); | ||
root.insert(3); | ||
assertEquals(3,root.getLeft().getRight().getLeft().getData()); | ||
} | ||
} |
Oops, something went wrong.