Skip to content

Commit db62da3

Browse files
committed
[F] C2S的高度只准保留一位小数后,舍入误差引起测试爆炸
1 parent d0de6ad commit db62da3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/chu/ChuTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public static bool CompareNote(ChuNote expected, ChuNote actual)
8686
if (!DurationsEquivalent(expected, actual)) return false;
8787
if (expected.Cell != actual.Cell || expected.Width != actual.Width) return false;
8888
if (expected.EndCell != actual.EndCell || expected.EndWidth != actual.EndWidth) return false;
89-
if (expected.Height != actual.Height || expected.EndHeight != actual.EndHeight) return false;
89+
if (Math.Abs(expected.Height - actual.Height) > 0.05m || Math.Abs(expected.EndHeight - actual.EndHeight) > 0.05m) return false;
9090
if (expected.CrushInterval != actual.CrushInterval) return false;
9191
if (!TagsEquivalent(expected, actual)) return false;
9292
if (expected.TargetNote != actual.TargetNote) return false;

0 commit comments

Comments
 (0)