On Jul 9, 5:23 pm, "Edward K. Ream" <[EMAIL PROTECTED]> wrote:
> On to multi-node tests! I have just added two multi-node unit tests which demonstrate that it is impossible, in general, to properly place a line on the boundary between nodes. These two tests are in test.leo in the shadow branch. They are called @shadow-test insert between nodes: at end of prev node @shadow-test insert between nodes: at start of next node The reason one of these tests *must* fail is that both will generate exactly the same new_public_lines: the only difference between these tests is, in essence, the *expected* result. This expected result is computed by the unit test from the 'new' outline, but this expected result is not available to the shadow code! Heuristics can not possibly help. The data available to the shadow code is exactly the same for both unit tests, yet the two unit tests ask for different results! Thus, one test must fail. I had foreseen this situation years ago, but alas, I let this difficulty stop me. In fact, this is not fatal flaw: it simply means that @auto must show nodes that have changed externally. Furthermore, the proximate cause of the failed unit test is an overly- strict test in test_propagate_changes. A lesser test at the end of propagate_changed_lines succeeds for both unit tests. This test ensures that the sentinel lines and non-sentinel lines *separately* match the expected sentinel and non-sentinel lines. This test is clearly too lax because it *completely* ignores the interleaving between sentinel and non-sentinel lines. In short, unit tests now dramatically illustrate all the old issues. I'll play around with multi-node unit tests a bit more, but the important parts of the project are now: 1. Integrate the shadow code into Leo's core so as to support @shadow nodes smoothly. 2. Devise a convenient, effective way to alert the user when the @shadow code actually updates nodes. Edward --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---
