Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366590 - [Compare]Add jsDiff unit tests.
Summary: [Compare]Add jsDiff unit tests.
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.4 M2   Edit
Assignee: libing wang CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 366871
  Show dependency tree
 
Reported: 2011-12-13 13:13 EST by libing wang CLA
Modified: 2011-12-15 16:01 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description libing wang CLA 2011-12-13 13:13:18 EST
We already have some test cases for testing the internal diff parser.
The inputs of the tests are strings of old content, new content and unified diff.
The out put is a list of mappers to control the rendering of the diff blocks in both inline and side-by-side compare editor.

To use one of the jsDIff APIS, createPatch, we need to pass all the unit tests.
we will still use the old and new contents in the test data but the unified diff will be generated by jsDiff.
Comment 1 libing wang CLA 2011-12-13 13:16:02 EST
Simon, I talked about removing the "loop" pattern in my test cases.
But it seems I have to keep this pattern in order to share the test data for both compare and jsDiff tests.
Comment 2 libing wang CLA 2011-12-14 18:10:29 EST
fixed with 640358f866b010cececa2e9b9779e5be2ac01ad9
I had to skip some cases for js diff only.
var jsDiffSkip = [23,29,37,39,40,41,42,43,44,49];
Will look at them later.