Mercurial > hg > RemoteEditor > Eclipse
changeset 169:31427856d0bd
*** empty log message ***
author | tkaito |
---|---|
date | Fri, 29 Aug 2008 13:37:38 +0900 |
parents | 63b4e8098553 |
children | 86894c5e5fef |
files | src/pathfinder/mergetest/test/RepCommandOptimizeTest.java |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pathfinder/mergetest/test/RepCommandOptimizeTest.java Thu Aug 28 22:57:56 2008 +0900 +++ b/src/pathfinder/mergetest/test/RepCommandOptimizeTest.java Fri Aug 29 13:37:38 2008 +0900 @@ -14,12 +14,12 @@ static String[] test1 = { Integer.toString(REP.REPCMD_INSERT),"TEST0","3","1", Integer.toString(REP.REPCMD_INSERT),"TEST1","3","2", - Integer.toString(REP.REPCMD_DELETE),"TEST2","5","3", + Integer.toString(REP.REPCMD_DELETE),"TEST2","1","3", Integer.toString(REP.REPCMD_DELETE),"TEST0","3","4", Integer.toString(REP.REPCMD_INSERT),"TEST1","3","5", Integer.toString(REP.REPCMD_INSERT),"TEST2","2","6", Integer.toString(REP.REPCMD_INSERT),"TEST0","1","7", - Integer.toString(REP.REPCMD_DELETE),"TEST1","3","8" + Integer.toString(REP.REPCMD_DELETE),"TEST1","10","8" }; @@ -91,13 +91,19 @@ REPCommand s = output.get(i); if(s.cmd==REP.REPCMD_INSERT) { if(s.lineno < lineno){ - s.lineno ++; + lineno ++; if(s.lineno == lineno){ output.remove(d); output.remove(s); break; } } + }else if(s.cmd==REP.REPCMD_DELETE){ + if(s.lineno < lineno){ + lineno --; + } + }else{ + System.out.println("There are no such commands."); } } }