(t *testing.T)
| 476 | } |
| 477 | |
| 478 | func TestDiffCleanupSemanticScore(t *testing.T) { |
| 479 | assert.Equal(t, 6, diffCleanupSemanticScore("", "AAA")) |
| 480 | assert.Equal(t, 5, diffCleanupSemanticScore("AAA\n\n", "BBB")) |
| 481 | assert.Equal(t, 5, diffCleanupSemanticScore("AAA", "\n\nBBB")) |
| 482 | assert.Equal(t, 5, diffCleanupSemanticScore("AAA", "\r\n\r\nBBB")) |
| 483 | assert.Equal(t, 4, diffCleanupSemanticScore("AAA\n", "BBB")) |
| 484 | assert.Equal(t, 3, diffCleanupSemanticScore("AAA.", " BBB")) |
| 485 | assert.Equal(t, 2, diffCleanupSemanticScore("AAA", " BBB")) |
| 486 | assert.Equal(t, 1, diffCleanupSemanticScore("AAA", "-BBB")) |
| 487 | assert.Equal(t, 0, diffCleanupSemanticScore("AAA", "BBB")) |
| 488 | } |
| 489 | |
| 490 | func TestDiffCleanupSemanticLossless(t *testing.T) { |
| 491 | type TestCase struct { |
nothing calls this directly
no test coverage detected