mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
优化测试用例
This commit is contained in:
parent
391146425f
commit
ef543c835a
@ -562,8 +562,21 @@ public class StrUtilTest {
|
||||
@Test
|
||||
public void briefTest3() {
|
||||
String str = "123abc";
|
||||
int maxLength = 3;
|
||||
|
||||
int maxLength = 6;
|
||||
String brief = StrUtil.brief(str, maxLength);
|
||||
Assert.assertEquals(str, brief);
|
||||
|
||||
maxLength = 5;
|
||||
brief = StrUtil.brief(str, maxLength);
|
||||
Assert.assertEquals("1...c", brief);
|
||||
|
||||
maxLength = 4;
|
||||
brief = StrUtil.brief(str, maxLength);
|
||||
Assert.assertEquals("1..c", brief);
|
||||
|
||||
maxLength = 3;
|
||||
brief = StrUtil.brief(str, maxLength);
|
||||
Assert.assertEquals("1.c", brief);
|
||||
|
||||
maxLength = 2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user