Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366590

Summary: [Compare]Add jsDiff unit tests.
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: ClientAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: simon_kaegi
Version: 0.3   
Target Milestone: 0.4 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 366871    

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.