Skip to content

Commit 07f0c67

Browse files
committed
improve test cases of strstr.java
1 parent e859fbc commit 07f0c67

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

source_code/StrStr.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: Beinan
33
* @Date: 2015-01-08 18:04:08
44
* @Last Modified by: Beinan
5-
* @Last Modified time: 2015-01-08 18:27:53
5+
* @Last Modified time: 2015-01-08 19:36:38
66
*/
77

88
public class StrStr {
@@ -32,7 +32,10 @@ public static int strStr(String source, String target){
3232
//test script
3333
public static void main(String[] args) {
3434
System.out.println(strStr("abcde", "cde"));
35-
System.out.println(strStr("abcde", "cdef"));
35+
System.out.println(strStr("abcde", "cdef"));
36+
System.out.println(strStr("abcde", ""));
37+
System.out.println(strStr("", ""));
38+
3639
}
3740

3841

0 commit comments

Comments
 (0)