-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQuicksortTest.java
More file actions
39 lines (33 loc) · 837 Bytes
/
QuicksortTest.java
File metadata and controls
39 lines (33 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import static org.junit.Assert.*;
import java.io.IOException;
import org.junit.Test;
// -------------------------------------------------------------------------
/**
* test quicksort.
*
* @author wenfeng ren
* @version Nov 4, 2014
*/
public class QuicksortTest
{
// ----------------------------------------------------------
/**
* test quicksort.
*
* @throws IOException
*/
@Test
public void test()
throws IOException
{
String[] str1 = { "-a", "text", "1" };
Genfile.main(str1);
String[] str2 = { "text", "1", "stat" };
Quicksort.main(str2);
String[] str9 = { "-b", "text", "10" };
Genfile.main(str9);
String[] str10 = { "text", "10", "stat" };
Quicksort.main(str10);
assertEquals("10", str10[1]);
}
}