Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Nov 13, 2024
1 parent f9be8ea commit 1a416bd
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class StringLikeLiteralTest {
@Test
public void testStrToDouble() {
// fix bug: maxStr.length = 4, maxStr.getBytes().length=12
// when converting str to double, bytes length is used instead of string length
String minStr = "商家+店长+场地+设备类型维度";
String maxStr = "商家维度";
double d1= StringLikeLiteral.getDouble(minStr);
double d1 = StringLikeLiteral.getDouble(minStr);
double d2 = StringLikeLiteral.getDouble(maxStr);
Assertions.assertTrue(d1 < d2);
}
Expand Down

0 comments on commit 1a416bd

Please sign in to comment.