Skip to content

Commit

Permalink
clear TEST code
Browse files Browse the repository at this point in the history
  • Loading branch information
caofanCPU committed May 8, 2021
1 parent 07c43cb commit 2bb89ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class VerbalExpressionUtil {
/**
* Judge current system is WINDOWS, by the way, WINDOWS is real ***...
*/
public static boolean CURRENT_OS_IS_WINDOWS = Objects.equals(System.getProperty("os.name").toLowerCase(), "windows");
public static final boolean CURRENT_OS_IS_WINDOWS = Objects.equals(System.getProperty("os.name").toLowerCase(), "windows");

/**
* Uppercase regular expression
Expand Down
38 changes: 1 addition & 37 deletions src/test/java/d8ger/D8T.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package d8ger;

import com.google.common.collect.Lists;
import com.xyz.caofancpu.d8ger.util.VerbalExpressionUtil;
import org.junit.Test;

import java.util.List;

/**
* This is a Test Demo showing how to execute a test case by junit.
*
Expand All @@ -16,39 +12,7 @@ public class D8T {

@Test
public void hello() {
String nonW = "/myProject/common/src/main/java/com/cy/common/model/Student";
String nonW1 = "myProject/common/src/main/java/com/cy/common/model/Student";
String w1 = "D:/myProject/common/src/main/java/com/cy/common/model/Student";
String w11 = "D://myProject//common//src//main//java//com//cy//common//model//Student";
String w121 = "D:";
String w122 = "D:/";
String w123 = "D://";
String w124 = "D:\\";
String w125 = "D:\\\\";
String w2 = "D:\\myProject\\common\\src\\main\\java\\com\\cy\\common\\model\\Student";
String w3 = "D:\\\\myProject\\\\common\\\\src\\\\main\\\\java\\\\com\\\\cy\\\\common\\\\model\\\\Student";
List<String> nonWindowsSourceList = Lists.newArrayList(nonW, nonW1);
//
List<String> windowsSourceList = Lists.newArrayList(w1, w11, w2, w3, w121, w122, w123, w124, w125);
System.out.println("非Windows系统:");
for (String s : nonWindowsSourceList) {
try {
System.out.println(" 原串 " + s + " 处理后变为 " + VerbalExpressionUtil.convertPathToPackage(s) + " ");
System.out.println(" 原串2 " + s + " 处理后变为 " + VerbalExpressionUtil.convertPathToPackage2(s) + " ");
} catch (Exception e) {
e.printStackTrace();
}
}
System.out.println("Windows系统:");
VerbalExpressionUtil.CURRENT_OS_IS_WINDOWS = Boolean.TRUE;
for (String s : windowsSourceList) {
try {
System.out.println(" 原串 " + s + " 处理后变为 " + VerbalExpressionUtil.convertPathToPackage(s) + " ");
System.out.println(" 原串2 " + s + " 处理后变为 " + VerbalExpressionUtil.convertPathToPackage2(s) + " ");
} catch (Exception e) {
e.printStackTrace();
}
}

}

}

0 comments on commit 2bb89ca

Please sign in to comment.