Skip to content

Commit 84aa1a9

Browse files
committed
Fix bug
1 parent b953f3f commit 84aa1a9

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/tester/tester.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ func judgeEquality(example string, actual string) bool {
125125
return true
126126
}
127127

128+
if !strings.Contains(example, ".") {
129+
return false
130+
}
131+
128132
af, err := strconv.ParseFloat(actual, 64)
129133
if err != nil {
130134
return false

lib/tester/tester_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ func Test_judgeEquality(t *testing.T) {
2121
actual: "hogehoge",
2222
expected: false,
2323
},
24+
{
25+
example: "3000293",
26+
actual: "3000292",
27+
expected: false,
28+
},
2429
{
2530
example: "100",
2631
actual: "100",

0 commit comments

Comments
 (0)