Elffuss BraidHub

kikocis/continue public

main · 623 BRenderedRawPermalink
1# Diff algorithm tests
2
3Tests are specified as
4
5```
6<CODE BEFORE>
7
8---
9
10<CODE AFTER>
11
12---
13
14<EXPECTED DIFF>
15```
16
17`---` is the delimeter, and surrounding whitespace will be trimmed.
18
19The expected diff can be generated with the `displayDiff` function.
20
21We make this explicit instead of comparing to the output of `myersDiff` in case the output from that is either unattainable or not exactly what we want.
22
23In order to generate the expected diff, you can first leave it empty and then run the test. The test will catch this and write the _computed_ diff to the test file. It is up to you to correct this to the expected diff.