Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 54254 Details for
Bug 165298
[projection] ProjectionMapping.toImageLine is wrong for projections at the end of the document
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Adding test9c to ProjectionMappingTest
ProjectionMapping_patch.txt (text/plain), 2.30 KB, created by
Anton Leherbauer
on 2006-11-21 06:51:02 EST
(
hide
)
Description:
Adding test9c to ProjectionMappingTest
Filename:
MIME Type:
Creator:
Anton Leherbauer
Created:
2006-11-21 06:51:02 EST
Size:
2.30 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.text.tests >Index: projection/org/eclipse/text/tests/ProjectionMappingTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.text.tests/projection/org/eclipse/text/tests/ProjectionMappingTest.java,v >retrieving revision 1.7 >diff -u -r1.7 ProjectionMappingTest.java >--- projection/org/eclipse/text/tests/ProjectionMappingTest.java 17 Jun 2005 15:49:33 -0000 1.7 >+++ projection/org/eclipse/text/tests/ProjectionMappingTest.java 21 Nov 2006 11:40:25 -0000 >@@ -59,6 +59,14 @@ > return buffer.toString(); > } > >+ private String getProjectionAtEndSlaveContent() { >+ StringBuffer buffer= new StringBuffer(getOriginalMasterContent()); >+ // fold all into line 1 >+ buffer.delete(40, 160); >+ buffer.delete(0, 20); >+ return buffer.toString(); >+ } >+ > private String getLineWrappingSlaveContent() { > StringBuffer buffer= new StringBuffer(getOriginalMasterContent()); > buffer.delete(80, 180); >@@ -89,6 +97,12 @@ > addProjection(60, 20, 20); > } > >+ private void createProjectionAtEnd() { >+ fMasterDocument.set(getOriginalMasterContent()); >+ fSlaveDocument.set(getProjectionAtEndSlaveContent()); >+ addProjection(20, 0, 20); >+ } >+ > private void createIdenticalProjection() { > fMasterDocument.set(getOriginalMasterContent()); > fSlaveDocument.set(getOriginalMasterContent()); >@@ -506,6 +520,27 @@ > } > } > >+ public void test9c() { >+ // test toImageLine >+ >+ createProjectionAtEnd(); >+ try { >+ assertEquals(-1, fProjectionMapping.toImageLine(0)); >+ assertEquals( 0, fProjectionMapping.toImageLine(1)); >+ // this fails >+ assertEquals(-1, fProjectionMapping.toImageLine(2)); >+ assertEquals(-1, fProjectionMapping.toImageLine(3)); >+ assertEquals(-1, fProjectionMapping.toImageLine(4)); >+ assertEquals(-1, fProjectionMapping.toImageLine(5)); >+ assertEquals(-1, fProjectionMapping.toImageLine(6)); >+ assertEquals(-1, fProjectionMapping.toImageLine(7)); >+ assertEquals(-1, fProjectionMapping.toImageLine(8)); >+ assertEquals(-1, fProjectionMapping.toImageLine(9)); >+ } catch (BadLocationException e) { >+ assertTrue(false); >+ } >+ } >+ > public void test9b() { > // test toImageLine > // test non-line wrapping, well distributed projection of empty lines
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 165298
: 54254