package edu.ustc.mix.multithread;

import org.junit.Test;

public class PrimeTest {
	
	@Test
	public void testPrime() throws Exception {
		for(int i = 0; i < 10; i++) {
			new PrimeThread(i).start();
			new Thread(new PrimeRun(i)).start();
		}
	}
}

@@ -253,11 +253,284 @@
 %09%7D%0D%0A%09%7D%0D%0A
+%09%0D%0A%09@Test%0D%0A%09public void testJoin() throws Exception %7B%0D%0A%09%09%0D%0A%09%09for(int i = 0; i %3C 50; i++) %7B%0D%0A%09%09%09PrimeThread primeThread = new PrimeThread(i);%0D%0A%09%09%09primeThread.start();%0D%0A%09%09%09primeThread.join();%0D%0A%09%09%7D%0D%0A%09%09%0D%0A%09%09Thread thread = new Thread(new PrimeRun(999));%0D%0A%09%09thread.start();%0D%0A%09%7D%0D%0A
 %7D%0D%0A

add join test