Skip to content

Commit 0e86d33

Browse files
committed
see 09/07 log
1 parent 9c98177 commit 0e86d33

File tree

8 files changed

+395
-201
lines changed

8 files changed

+395
-201
lines changed

app/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ android {
2929

3030
buildTypes {
3131
debug {
32-
minifyEnabled true
32+
minifyEnabled false
3333
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
3434
}
3535
release {
@@ -77,8 +77,6 @@ dependencies {
7777
releaseCompile leakCanary
7878
testCompile leakCanary
7979

80-
compile 'com.tencent.mars:mars-core:1.2.0'
81-
8280
// compile 'com.blankj:utilcode:1.9.0'
8381
}
8482

app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@
5151
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
5252
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
5353

54-
<uses-sdk tools:overrideLibrary="com.tencent.mars"/>
55-
5654
<application
5755
android:name=".UtilsApp"
5856
android:allowBackup="false"

subutil/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ android {
3333
buildTypes {
3434
debug {
3535
testCoverageEnabled true
36-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
3736
}
3837
release {
39-
minifyEnabled true
38+
minifyEnabled false
4039
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
4140
}
4241
}

utilcode/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,10 @@ android {
3232

3333
buildTypes {
3434
debug {
35-
minifyEnabled false
3635
testCoverageEnabled true
37-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
3836
}
3937
release {
40-
minifyEnabled true
38+
minifyEnabled false
4139
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
4240
}
4341
}

utilcode/src/test/java/com/blankj/utilcode/util/EncryptUtilsTest.java

Lines changed: 331 additions & 146 deletions
Large diffs are not rendered by default.

utilcode/src/test/java/com/blankj/utilcode/util/FileIOUtilsTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
package com.blankj.utilcode.util;
22

3+
import org.junit.Assert;
34
import org.junit.Test;
45

6+
import java.io.FileInputStream;
7+
58
import static com.blankj.utilcode.util.TestUtils.FILE_SEP;
69

710
/**
@@ -19,8 +22,8 @@ public class FileIOUtilsTest {
1922

2023
@Test
2124
public void writeFileFromIS() throws Exception {
22-
// assertTrue(FileIOUtils.writeFileFromIS(path + "NEW.txt", new FileInputStream(path + "UTF8.txt"), false));
23-
// assertTrue(FileIOUtils.writeFileFromIS(path + "NEW.txt", new FileInputStream(path + "UTF8.txt"), true));
25+
Assert.assertTrue(FileIOUtils.writeFileFromIS(path + "NEW.txt", new FileInputStream(path + "UTF8.txt"), false));
26+
Assert.assertTrue(FileIOUtils.writeFileFromIS(path + "NEW.txt", new FileInputStream(path + "UTF8.txt"), true));
2427
}
2528

2629
@Test

utilcode/src/test/java/com/blankj/utilcode/util/RegexUtilsTest.java

Lines changed: 55 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
package com.blankj.utilcode.util;
22

3+
import org.junit.Assert;
34
import org.junit.Test;
45

56
import java.util.Arrays;
67

7-
import static com.blankj.utilcode.util.RegexUtils.*;
8-
import static com.google.common.truth.Truth.assertThat;
8+
import static com.blankj.utilcode.util.RegexUtils.getMatches;
9+
import static com.blankj.utilcode.util.RegexUtils.getReplaceAll;
10+
import static com.blankj.utilcode.util.RegexUtils.getReplaceFirst;
11+
import static com.blankj.utilcode.util.RegexUtils.getSplits;
12+
import static com.blankj.utilcode.util.RegexUtils.isDate;
13+
import static com.blankj.utilcode.util.RegexUtils.isEmail;
14+
import static com.blankj.utilcode.util.RegexUtils.isIDCard18;
15+
import static com.blankj.utilcode.util.RegexUtils.isIP;
16+
import static com.blankj.utilcode.util.RegexUtils.isMatch;
17+
import static com.blankj.utilcode.util.RegexUtils.isMobileExact;
18+
import static com.blankj.utilcode.util.RegexUtils.isMobileSimple;
19+
import static com.blankj.utilcode.util.RegexUtils.isTel;
20+
import static com.blankj.utilcode.util.RegexUtils.isURL;
21+
import static com.blankj.utilcode.util.RegexUtils.isUsername;
22+
import static com.blankj.utilcode.util.RegexUtils.isZh;
923

1024
/**
1125
* <pre>
@@ -19,85 +33,85 @@ public class RegexUtilsTest {
1933

2034
@Test
2135
public void testIsMobileSimple() throws Exception {
22-
assertThat(isMobileSimple("11111111111")).isTrue();
36+
Assert.assertTrue(isMobileSimple("11111111111"));
2337
}
2438

2539
@Test
2640
public void testIsMobileExact() throws Exception {
27-
assertThat(isMobileExact("11111111111")).isFalse();
28-
assertThat(isMobileExact("13888880000")).isTrue();
41+
Assert.assertFalse(isMobileExact("11111111111"));
42+
Assert.assertTrue(isMobileExact("13888880000"));
2943
}
3044

3145
@Test
3246
public void testIsTel() throws Exception {
33-
assertThat(isTel("033-88888888")).isTrue();
34-
assertThat(isTel("033-7777777")).isTrue();
35-
assertThat(isTel("0444-88888888")).isTrue();
36-
assertThat(isTel("0444-7777777")).isTrue();
37-
assertThat(isTel("033 88888888")).isTrue();
38-
assertThat(isTel("033 7777777")).isTrue();
39-
assertThat(isTel("0444 88888888")).isTrue();
40-
assertThat(isTel("0444 7777777")).isTrue();
41-
assertThat(isTel("03388888888")).isTrue();
42-
assertThat(isTel("0337777777")).isTrue();
43-
assertThat(isTel("044488888888")).isTrue();
44-
assertThat(isTel("04447777777")).isTrue();
45-
46-
assertThat(isTel("133-88888888")).isFalse();
47-
assertThat(isTel("033-666666")).isFalse();
48-
assertThat(isTel("0444-999999999")).isFalse();
47+
Assert.assertTrue(isTel("033-88888888"));
48+
Assert.assertTrue(isTel("033-7777777"));
49+
Assert.assertTrue(isTel("0444-88888888"));
50+
Assert.assertTrue(isTel("0444-7777777"));
51+
Assert.assertTrue(isTel("033 88888888"));
52+
Assert.assertTrue(isTel("033 7777777"));
53+
Assert.assertTrue(isTel("0444 88888888"));
54+
Assert.assertTrue(isTel("0444 7777777"));
55+
Assert.assertTrue(isTel("03388888888"));
56+
Assert.assertTrue(isTel("0337777777"));
57+
Assert.assertTrue(isTel("044488888888"));
58+
Assert.assertTrue(isTel("04447777777"));
59+
60+
Assert.assertFalse(isTel("133-88888888"));
61+
Assert.assertFalse(isTel("033-666666"));
62+
Assert.assertFalse(isTel("0444-999999999"));
4963
}
5064

5165
@Test
5266
public void testIsIDCard() throws Exception {
53-
assertThat(isIDCard18("33698418400112523x")).isTrue();
54-
assertThat(isIDCard18("336984184001125233")).isTrue();
55-
assertThat(isIDCard18("336984184021125233")).isFalse();
67+
Assert.assertTrue(isIDCard18("33698418400112523x"));
68+
Assert.assertTrue(isIDCard18("336984184001125233"));
69+
Assert.assertFalse(isIDCard18("336984184021125233"));
5670
}
5771

5872
@Test
5973
public void testIsEmail() throws Exception {
60-
assertThat(isEmail("[email protected]")).isTrue();
61-
assertThat(isEmail("blankj@qq")).isFalse();
74+
Assert.assertTrue(isEmail("[email protected]"));
75+
Assert.assertFalse(isEmail("blankj@qq"));
6276
}
6377

6478
@Test
6579
public void testIsURL() throws Exception {
66-
assertThat(isURL("http://blankj.com/")).isTrue();
67-
assertThat(isURL("https:blank")).isFalse();
80+
Assert.assertTrue(isURL("http://blankj.com/"));
81+
Assert.assertFalse(isURL("https:blank"));
6882
}
6983

7084
@Test
7185
public void testIsChz() throws Exception {
72-
assertThat(isZh("我")).isTrue();
73-
assertThat(isZh("wo")).isFalse();
86+
Assert.assertTrue(isZh("我"));
87+
Assert.assertFalse(isZh("wo"));
7488
}
7589

7690
@Test
7791
public void testIsUsername() throws Exception {
78-
assertThat(isUsername("小明233333")).isTrue();
79-
assertThat(isUsername("小明")).isFalse();
80-
assertThat(isUsername("小明233333_")).isFalse();
92+
Assert.assertTrue(isUsername("小明233333"));
93+
Assert.assertFalse(isUsername("小明"));
94+
Assert.assertFalse(isUsername("小明233333_"));
8195
}
8296

8397
@Test
8498
public void testIsDate() throws Exception {
85-
assertThat(isDate("2016-08-16")).isTrue();
86-
assertThat(isDate("2016-02-29")).isTrue();
87-
assertThat(isDate("2015-02-29")).isFalse();
88-
assertThat(isDate("2016-8-16")).isFalse();
99+
Assert.assertTrue(isDate("2016-08-16"));
100+
Assert.assertTrue(isDate("2016-02-29"));
101+
Assert.assertFalse(isDate("2015-02-29"));
102+
Assert.assertFalse(isDate("2016-8-16"));
89103
}
90104

91105
@Test
92106
public void testIsIP() throws Exception {
93-
assertThat(isIP("255.255.255.0")).isTrue();
94-
assertThat(isIP("256.255.255.0")).isFalse();
107+
Assert.assertTrue(isIP("255.255.255.0"));
108+
Assert.assertFalse(isIP("256.255.255.0"));
95109
}
96110

97111
@Test
98112
public void testIsMatch() throws Exception {
99-
assertThat(isMatch("\\d?", "1")).isTrue();
100-
assertThat(isMatch("\\d?", "a")).isFalse();
113+
Assert.assertTrue(isMatch("\\d?", "1"));
114+
Assert.assertFalse(isMatch("\\d?", "a"));
101115
}
102116

103117
@Test

utilcode/src/test/java/com/blankj/utilcode/util/TestUtils.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static void init() {
3939
Utils.init(RuntimeEnvironment.application);
4040
}
4141

42-
// @Test
42+
// @Test
4343
public void readme2Eng() throws Exception {
4444
formatCN();
4545
File readmeCN = new File(new File(System.getProperty("user.dir")).getAbsolutePath() + FILE_SEP + "README-CN.md");
@@ -116,6 +116,5 @@ public void formatCN() throws Exception {
116116

117117
@Test
118118
public void test() throws Exception {
119-
120119
}
121120
}

0 commit comments

Comments
 (0)