You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2010/05/26 11:31:15 UTC
svn commit: r948377 [16/21] - in /harmony/enhanced/java/branches/mrh:
classlib/make/ classlib/modules/accessibility/make/
classlib/modules/annotation/make/ classlib/modules/applet/make/
classlib/modules/archive/make/ classlib/modules/archive/src/test/j...
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/CompositeView_VisualPositionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/CompositeView_VisualPositionTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/CompositeView_VisualPositionTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/CompositeView_VisualPositionTest.java Wed May 26 09:31:07 2010
@@ -23,6 +23,7 @@ import java.util.List;
import javax.swing.text.Position.Bias;
import junit.framework.TestCase;
+import tests.support.Support_Excludes;
/**
* Tests how <code>CompositeView</code> traverses view hierarchy to calculate
@@ -198,6 +199,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Right_01Edge_NonFlipped()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
boxViewFlip = false;
// Forward
@@ -231,6 +236,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Right_01Edge_Flipped()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
boxViewFlip = true;
// Forward
@@ -262,6 +271,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Right_12Edge_NonFlipped()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
boxViewFlip = false;
// Forward
@@ -298,6 +311,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Right_12Edge_Flipped()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
boxViewFlip = true;
// Forward
@@ -331,6 +348,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Right_0Middle_NonFlipped()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
boxViewFlip = false;
// Forward
@@ -362,6 +383,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Right_0Middle_Flipped()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
boxViewFlip = true;
// Forward
@@ -393,6 +418,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Right_AtBeginning0()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// Forward
assertNextPosition(1, Forward, 0, Forward, View.EAST);
assertEquals(1, visPosCalled.size());
@@ -422,6 +451,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Right_AtBeginningMinus1()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(-1, view.getViewIndex(-1, Forward));
// Forward
@@ -451,6 +484,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Right_AtBeginningMinus2()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(-1, view.getViewIndex(-2, Forward));
try {
assertNextPosition(length, Forward, -2, Forward, View.EAST);
@@ -464,6 +501,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Right_AtEndLength()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(2, view.getViewIndex(length, Forward));
// Forward
@@ -495,6 +536,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Right_AtEndLength1()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(-1, view.getViewIndex(length + 1, Forward));
try {
assertNextPosition(length, Forward, length + 1, Forward, View.EAST);
@@ -509,6 +554,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Left_01Edge_NonFlipped()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
boxViewFlip = false;
// Forward
@@ -540,6 +589,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Left_01Edge_Flipped()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
boxViewFlip = true;
// Forward
@@ -571,6 +624,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Left_12Edge_NonFlipped()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
boxViewFlip = false;
// Forward
@@ -604,6 +661,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Left_12Edge_Flipped()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
boxViewFlip = true;
// Forward
@@ -635,6 +696,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Left_0Middle_NonFlipped()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
boxViewFlip = false;
// Forward
@@ -666,6 +731,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Left_0Middle_Flipped()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
boxViewFlip = true;
// Forward
@@ -697,6 +766,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Left_AtBeginning0()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// Forward
assertNextPosition(-1, null, 0, Forward, View.WEST);
assertEquals(1, visPosCalled.size());
@@ -726,6 +799,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Left_AtBeginningMinus1()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// Forward
assertNextPosition(length, Forward, -1, Forward, View.WEST);
assertEquals(1, visPosCalled.size());
@@ -754,6 +831,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Left_AtBeginningMinus2()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
assertNextPosition(length, Forward, -2, Forward, View.WEST);
fail("ArrayIndexOutOfBoundsException is expected");
@@ -766,6 +847,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Left_AtEndLength()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// Forward
assertNextPosition(length - 1, Forward, length, Forward, View.WEST);
assertEquals(1, visPosCalled.size());
@@ -795,6 +880,10 @@ public class CompositeView_VisualPositio
public void testGetNextVisualPositionFrom_Left_AtEndLength1()
throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
assertNextPosition(length, Forward, length + 1, Forward, View.WEST);
fail("ArrayIndexOutOfBoundsException is expected");
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultCaretTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultCaretTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultCaretTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultCaretTest.java Wed May 26 09:31:07 2010
@@ -39,6 +39,7 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.plaf.TextUI;
import javax.swing.text.Position.Bias;
+import tests.support.Support_Excludes;
public class DefaultCaretTest extends SwingTestCase {
JTextArea jta = null;
@@ -207,10 +208,18 @@ public class DefaultCaretTest extends Sw
}
public void testDefaultCaret() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNotNull(dc);
}
public void testGetComponent() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(jta, dc.getComponent());
}
@@ -220,6 +229,10 @@ public class DefaultCaretTest extends Sw
* Mark is 0.
*/
public void testInstall() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
int tCompListenersCountCurrent = jta.getListeners(MouseListener.class).length
+ jta.getListeners(MouseMotionListener.class).length
+ jta.getListeners(FocusListener.class).length
@@ -239,6 +252,10 @@ public class DefaultCaretTest extends Sw
* Document listener was removed.
*/
public void testDeinstall() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
int i = jta.getListeners(MouseListener.class).length;
int j = jta.getListeners(MouseMotionListener.class).length;
int k = jta.getListeners(FocusListener.class).length;
@@ -258,6 +275,10 @@ public class DefaultCaretTest extends Sw
* Tests methods IsVisible and SetVisible
*/
public void testIsVisible() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
dc.setVisible(true);
assertTrue("dc.isVisible()= false after" + " dc.setVisible(true)", dc.isVisible());
dc.setVisible(false);
@@ -268,6 +289,10 @@ public class DefaultCaretTest extends Sw
* Tests methods isSelectionVisible and setSelectionVisible
*/
public void testIsSelectionVisible() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNotNull(dc);
dc.setSelectionVisible(true);
assertTrue("dc.isSelectionVisible()= false after" + " dc.setSelectionVisible(true)", dc
@@ -278,6 +303,10 @@ public class DefaultCaretTest extends Sw
}
public void testEquals() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertFalse(dc.equals(new DefaultCaret()));
assertTrue(dc.equals(dc));
assertTrue(dc.equals(jta.getCaret()));
@@ -287,6 +316,10 @@ public class DefaultCaretTest extends Sw
* Tests addChangeListener,removeChangeListener, getChangeListener
*/
public void testChangeListeners() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
SimpleChangeListener t1 = new SimpleChangeListener();
SimpleChangeListener t2 = new SimpleChangeListener();
@@ -329,6 +362,10 @@ public class DefaultCaretTest extends Sw
}
public void testGetBlinkRate() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(0, dc.getBlinkRate());
dc.setBlinkRate(100);
assertEquals(100, dc.getBlinkRate());
@@ -342,6 +379,10 @@ public class DefaultCaretTest extends Sw
}
public void testSetDot() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
dc.setDot(8);
dc.moveDot(10);
dc.setDot(5);
@@ -350,6 +391,10 @@ public class DefaultCaretTest extends Sw
}
public void testMoveDot() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
dc.setDot(4);
dc.moveDot(9);
assertEquals("tArea", jta.getSelectedText());
@@ -358,6 +403,10 @@ public class DefaultCaretTest extends Sw
}
public void testGetDot() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
jta.setSelectionStart(11);
jta.setSelectionEnd(14);
assertEquals(14, dc.getDot());
@@ -374,6 +423,10 @@ public class DefaultCaretTest extends Sw
* Tryes to set caret position by Mouse Events (dot = mark)
*/
public void testPositionCaret() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Position.Bias bias[] = new Position.Bias[1];
int tmp;
jta.setText(sLTR + sRTL + sLTR + sRTL + sLTR + sRTL + sLTR + sRTL);
@@ -400,6 +453,10 @@ public class DefaultCaretTest extends Sw
* Tryes to move caret position by Mouse Events (dot = mark)
*/
public void testMoveCaret() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
dc.positionCaret(new MouseEvent(jta, MouseEvent.MOUSE_CLICKED, 0, 0, jta.getX() + r1.x,
jta.getY() + r1.y, 0, false));
dc.moveCaret(new MouseEvent(jta, MouseEvent.MOUSE_CLICKED, 0, 0, jta.getX() + r2.x, jta
@@ -420,12 +477,20 @@ public class DefaultCaretTest extends Sw
* Tests setMagicCaretPosition and getMagicCaretPosition
*/
public void testSetMagicCaretPosition() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
dc.setMagicCaretPosition(p);
assertTrue(dc.getMagicCaretPosition().equals(p));
}
// TODO: may be add other listeners (not ChangeListener)
public void testGetListeners() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
EventListener[] EvLList = null;
SimpleChangeListener ChL1 = new SimpleChangeListener();
SimpleChangeListener ChL2 = new SimpleChangeListener();
@@ -449,6 +514,10 @@ public class DefaultCaretTest extends Sw
* was invoked ejta.scrollRectToVisible then ejta.flag would become 1.
*/
public void testAdjustVisibility() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
r = jta.modelToView(8);
if (r == null) {
@@ -467,11 +536,19 @@ public class DefaultCaretTest extends Sw
// Regression for HARMONY-2780
public void testAdjustVisibilityNull() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
new DefaultCaret().adjustVisibility(null);
// No exception is expected
}
public void testFireStateChanged() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
SimpleChangeListenerForFire CHL1 = new SimpleChangeListenerForFire("L1");
SimpleChangeListenerForFire CHL2 = new SimpleChangeListenerForFire("L2");
SimpleChangeListenerForFire CHL3 = new SimpleChangeListenerForFire("L3");
@@ -490,6 +567,10 @@ public class DefaultCaretTest extends Sw
}
public void testGetSelectionPainter() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Highlighter.Highlight[] h = jta.getHighlighter().getHighlights();
pnt = dc.getSelectionPainter();
assertNotNull("DefaultCaret.getSelectionPainter()=null", pnt);
@@ -522,6 +603,10 @@ public class DefaultCaretTest extends Sw
}
public void testFocusGained() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
jta.setEditable(true);
dc.focusGained(new FocusEvent(jta, FocusEvent.FOCUS_GAINED));
assertTrue(dc.isVisible());
@@ -536,11 +621,19 @@ public class DefaultCaretTest extends Sw
}
public void testFocusLost() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
dc.focusLost(new FocusEvent(jta, FocusEvent.FOCUS_LOST));
assertFalse(dc.isVisible());
}
public void testMouseDragged() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
dc.mousePressed(new MouseEvent(jta, MouseEvent.MOUSE_PRESSED, 0,
InputEvent.BUTTON1_MASK, jta.getX() + r1.x, jta.getY() + r1.y, 0, false,
MouseEvent.BUTTON1));
@@ -571,6 +664,10 @@ public class DefaultCaretTest extends Sw
}
public void testMouseClicked() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
dc.mouseClicked(new MouseEvent(jta, MouseEvent.MOUSE_CLICKED, 0,
InputEvent.BUTTON1_DOWN_MASK, jta.getX() + r1.x, jta.getY() + r1.y, 2, false,
MouseEvent.BUTTON1));
@@ -583,6 +680,10 @@ public class DefaultCaretTest extends Sw
}
public void testMousePressed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
dc.mousePressed(new MouseEvent(jta, MouseEvent.MOUSE_PRESSED, 0,
InputEvent.SHIFT_DOWN_MASK, jta.getX() + r3.x, jta.getY() + r3.y, 0, false,
MouseEvent.BUTTON1));
@@ -590,6 +691,10 @@ public class DefaultCaretTest extends Sw
}
public void testDocInsChange_DotEqMark() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
dc.setDot(5);
jta.getDocument().insertString(3, "insert", null);
@@ -614,6 +719,10 @@ public class DefaultCaretTest extends Sw
}
public void testDocInsChange_DotNotEqMark() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
dc.setDot(11);
dc.moveDot(6);
@@ -643,6 +752,10 @@ public class DefaultCaretTest extends Sw
}
public void testDocRemoveChange_DotEqMark() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
dc.setDot(5);
try {
jta.getDocument().remove(3, 1);
@@ -687,6 +800,10 @@ public class DefaultCaretTest extends Sw
}
public void testDocRemoveChange_DotNotEqMark() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
dc.setDot(11);
dc.moveDot(6);
try {
@@ -720,6 +837,10 @@ public class DefaultCaretTest extends Sw
*
*/
public void testDocNeverUpdate() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
dc.setUpdatePolicy(DefaultCaret.NEVER_UPDATE);
dc.setDot(6);
try {
@@ -750,6 +871,10 @@ public class DefaultCaretTest extends Sw
*
*/
public void testConstants() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(DefaultCaret.ALWAYS_UPDATE, 2);
assertEquals(DefaultCaret.NEVER_UPDATE, 1);
assertEquals(DefaultCaret.UPDATE_WHEN_ON_EDT, 0);
@@ -760,6 +885,10 @@ public class DefaultCaretTest extends Sw
*
*/
public void testSetGetUpdatePolicy() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
dc.setUpdatePolicy(0);
assertEquals(0, dc.getUpdatePolicy());
dc.setUpdatePolicy(1);
@@ -780,6 +909,10 @@ public class DefaultCaretTest extends Sw
}
public void testCaretColor() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
//TODO Runnable
jta.setSelectionColor(c1);
jta.setCaretColor(c2);
@@ -793,6 +926,10 @@ public class DefaultCaretTest extends Sw
}
public void testInvokeFireStateChanged() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
CHL = new SimpleChangeListener();
dc.addChangeListener(CHL);
dc.setDot(5);
@@ -824,6 +961,10 @@ public class DefaultCaretTest extends Sw
}
public void testToString() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
dc.setDot(4);
dc.moveDot(9);
assertEquals("Dot=(9, Forward) Mark=(4, Forward)", dc.toString());
@@ -875,6 +1016,10 @@ public class DefaultCaretTest extends Sw
* assertTrue(dc.getAsynchronousMovement()); }
*/
public void testNavigationFilter() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(jta.getNavigationFilter());
filter = new SimpleNavigationFilter();
jta.setNavigationFilter(filter);
@@ -886,6 +1031,10 @@ public class DefaultCaretTest extends Sw
//TODO
public void testIsActive() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
dc.setVisible(true);
assertTrue(dc.isActive());
dc.setVisible(false);
@@ -893,6 +1042,10 @@ public class DefaultCaretTest extends Sw
}
public void test3820() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
DefaultCaret dc = new DefaultCaret();
assertEquals(0, dc.getChangeListeners().length);
dc.addChangeListener(null);
@@ -900,6 +1053,10 @@ public class DefaultCaretTest extends Sw
}
public void test4208() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
dc.setSelectionVisible(false);
jta.selectAll();
assertEquals(0, jta.getHighlighter().getHighlights().length);
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultCaret_BidiTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultCaret_BidiTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultCaret_BidiTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultCaret_BidiTest.java Wed May 26 09:31:07 2010
@@ -22,6 +22,7 @@ package javax.swing.text;
import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.SwingTestCase;
+import tests.support.Support_Excludes;
public class DefaultCaret_BidiTest extends SwingTestCase {
AbstractDocument ad;
@@ -113,6 +114,10 @@ public class DefaultCaret_BidiTest exten
}
public void testBidiInsert() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
insertCase(0, sLTR, 2, Position.Bias.Forward, 3, Position.Bias.Forward);
insertCase(1, sLTR, 2, Position.Bias.Forward, 3, Position.Bias.Forward);
insertCase(2, sLTR, 2, Position.Bias.Forward, 3, Position.Bias.Backward);//b=f
@@ -152,6 +157,10 @@ public class DefaultCaret_BidiTest exten
}
public void testBidiRemove() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String s1 = sLTR + sRTL + sLTR + sRTL + sLTR + sRTL + sLTR + sRTL + sLTR;
String s2 = sRTL + sRTL + sLTR + sLTR + sRTL + sRTL + sLTR + sLTR + sRTL;
//s1 = sLTR + sRTL + sLTR + sRTL + sLTR + sRTL + sLTR + sRTL +
@@ -189,6 +198,10 @@ public class DefaultCaret_BidiTest exten
}
public void testBidiSetDot() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
setDotCase(0, Position.Bias.Forward, "Forward)");
setDotCase(1, Position.Bias.Backward, "Backward)");
setDotCase(2, Position.Bias.Forward, "Forward)");
@@ -197,6 +210,10 @@ public class DefaultCaret_BidiTest exten
}
public void testBidiMoveDot() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
jta.setText(sLTR + sRTL + sLTR + sRTL + sLTR);
dc.setDot(1, Position.Bias.Backward);
dotTest(1, Position.Bias.Backward, "Dot=(1, Backward) Mark=(1, Backward)");
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultCaret_MultithreadedTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultCaret_MultithreadedTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultCaret_MultithreadedTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultCaret_MultithreadedTest.java Wed May 26 09:31:07 2010
@@ -24,6 +24,7 @@ import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.SwingUtilities;
import javax.swing.SwingWaitTestCase;
+import tests.support.Support_Excludes;
public class DefaultCaret_MultithreadedTest extends BasicSwingTestCase {
AbstractDocument ad;
@@ -74,6 +75,10 @@ public class DefaultCaret_MultithreadedT
};
public void testAsyncUpdate() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
waitForIdle();
SwingWaitTestCase.isRealized(jf);
ad.writeLock();
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultEditorKitRTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultEditorKitRTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultEditorKitRTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultEditorKitRTest.java Wed May 26 09:31:07 2010
@@ -36,6 +36,7 @@ import javax.swing.JTextArea;
import javax.swing.JViewport;
import javax.swing.ScrollPaneConstants;
import javax.swing.SwingUtilities;
+import tests.support.Support_Excludes;
public class DefaultEditorKitRTest extends BasicSwingTestCase {
protected DefaultEditorKit kit = null;
@@ -111,6 +112,10 @@ public class DefaultEditorKitRTest exten
}
public void testInsertContentActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Action action = getAction(DefaultEditorKit.insertContentAction);
JTextArea c = getInitedComponent(2, 7, "0123456789");
performAction(new JTextArea(), action, "command\ncontent");
@@ -125,6 +130,10 @@ public class DefaultEditorKitRTest exten
}
public void testReadInputStreamDocumentint() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
final Marker readerMarker = new Marker();
DefaultEditorKit kit = new DefaultEditorKit() {
private static final long serialVersionUID = 1L;
@@ -140,6 +149,10 @@ public class DefaultEditorKitRTest exten
}
public void testWriteOutputStreamDocumentintint() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
final Marker writeMarker = new Marker();
DefaultEditorKit kit = new DefaultEditorKit() {
private static final long serialVersionUID = 1L;
@@ -155,6 +168,10 @@ public class DefaultEditorKitRTest exten
}
public void testInsertContentActionPerformed_NullEvent() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
final TextAction action = (TextAction) getAction(DefaultEditorKit.insertContentAction);
final JTextArea c = getInitedComponent(2, 7, "0123456789");
assertNotNull(c);
@@ -173,6 +190,10 @@ public class DefaultEditorKitRTest exten
}
public void testRead() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String str1 = "Windows line-end\r\nUnix-style\nMacOS\rUnknown\n\r";
String str2 = "Windows line-end\nUnix-style\nMacOS\nUnknown\n\n";
InputStream reader = new ByteArrayInputStream(str1.getBytes());
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultEditorKit_Actions_MultithreadedTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultEditorKit_Actions_MultithreadedTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultEditorKit_Actions_MultithreadedTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultEditorKit_Actions_MultithreadedTest.java Wed May 26 09:31:07 2010
@@ -47,6 +47,7 @@ import javax.swing.JTextArea;
import javax.swing.JViewport;
import javax.swing.ScrollPaneConstants;
import javax.swing.SwingUtilities;
+import tests.support.Support_Excludes;
public class DefaultEditorKit_Actions_MultithreadedTest extends BasicSwingTestCase {
protected DefaultEditorKit kit = null;
@@ -191,6 +192,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testUnselectActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "012345 6789\nasfd\nasd asd";
Action action = getAction(DefaultEditorKit.unselectAction);
JTextArea c = getInitedComponent(10, 15, text);
@@ -200,6 +205,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testToggleComponentOrientationPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "012345 6789\nasfd\nasd asd";
Action action = getAction(DefaultEditorKit.toggleComponentOrientationAction);
JTextArea c = getInitedComponent(10, 15, text);
@@ -211,6 +220,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testDumpModelActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ByteArrayOutputStream out = new ByteArrayOutputStream();
PrintStream oldErr = System.err;
System.setErr(new PrintStream(out));
@@ -230,6 +243,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testPageActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "01\n23\n45\n677777777777777777777777777777777777777777777777777\n89\n0-\nqwe\nrty\nasd\n\n\n\n\nzxc\nvbn";
Action action = getAction("selection-page-right");
JTextArea c = getInitedComponent(3, 7, text);
@@ -260,6 +277,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testVerticalPageActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "111111111111111\n2\n3\n44444444\n55555555555\n6\n7\n8\n9\n0\n1\n2\n3\n4\n5555555555555555555";
Action action = getAction(DefaultEditorKit.pageDownAction);
JTextArea c = getInitedComponent(4, 6, text);
@@ -321,6 +342,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testWritableActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "012345 6789\nasfd\nasd asd";
Action action = getAction(DefaultEditorKit.writableAction);
JTextArea c = getInitedComponent(13, 15, text);
@@ -331,6 +356,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testReadOnlyActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "012345 6789\nasfd\nasd asd";
Action action = getAction(DefaultEditorKit.readOnlyAction);
JTextArea c = getInitedComponent(13, 15, text);
@@ -340,6 +369,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testEndParagraphActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "\t012345 6789\nasfd\n\n\tasd asd";
Action action = getAction(DefaultEditorKit.endParagraphAction);
JTextArea c = getInitedComponent(6, text);
@@ -365,6 +398,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testBeginParagraphActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "\t012345 6789\nasfd\n\n\tasd asd";
Action action = getAction(DefaultEditorKit.beginParagraphAction);
JTextArea c = getInitedComponent(6, text);
@@ -390,6 +427,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testBeginWordActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "012345 6789\nasfd\nasd asd";
Action action = getAction(DefaultEditorKit.beginWordAction);
JTextArea c = getInitedComponent(13, 15, text);
@@ -424,6 +465,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testEndWordActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "012345 6789\nasfd\nasd asd";
Action action = getAction(DefaultEditorKit.endWordAction);
JTextArea c = getInitedComponent(13, 15, text);
@@ -454,6 +499,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testPreviousWordActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "012345 6789\nasfd\nasd asd";
Action action = getAction(DefaultEditorKit.previousWordAction);
JTextArea c = getInitedComponent(13, 15, text);
@@ -488,6 +537,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testNextWordActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "012345 6789\nasfd\nasd asd";
Action action = getAction(DefaultEditorKit.nextWordAction);
JTextArea c = getInitedComponent(13, 15, text);
@@ -518,6 +571,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testBeginLineActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Action action = getAction(DefaultEditorKit.beginLineAction);
String text = "0123456789\n12341234\n12341234";
JTextArea c = getInitedComponent(14, text);
@@ -540,6 +597,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testEndLineActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Action action = getAction(DefaultEditorKit.endLineAction);
String text = "0123456789\n12341234\n12341234";
JTextArea c = getInitedComponent(14, text);
@@ -562,6 +623,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testEndActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Action action = getAction(DefaultEditorKit.endAction);
String text = "0123456789\n12341234\n12341234";
JTextArea c = getInitedComponent(8, 14, text);
@@ -584,6 +649,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testBeginActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Action action = getAction(DefaultEditorKit.beginAction);
String text = "0123456789\n12341234\n12341234";
JTextArea c = getInitedComponent(8, 14, text);
@@ -606,6 +675,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testSelectWordActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "012345 6789\nasfd\nasd asd";
Action action = getAction(DefaultEditorKit.selectWordAction);
JTextArea c = getInitedComponent(15, text);
@@ -623,6 +696,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testSelectLineActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "0123 456789\nasdf";
Action action = getAction(DefaultEditorKit.selectLineAction);
JTextArea c = getInitedComponent(5, text);
@@ -637,6 +714,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testSelectParagraphActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "\t012345 6789\nasfd\n\n\tasd asd";
Action action = getAction(DefaultEditorKit.selectParagraphAction);
JTextArea c = getInitedComponent(6, text);
@@ -657,6 +738,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testSelectAllActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "0123456789\nasdasd";
Action action = getAction(DefaultEditorKit.selectAllAction);
JTextArea c = getInitedComponent(2, 7, text);
@@ -668,6 +753,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testDeleteNextCharActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Action action = getAction(DefaultEditorKit.deleteNextCharAction);
JTextArea c = getInitedComponent(2, 7, "0123456789");
performAction(c, action);
@@ -684,6 +773,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testDeletePrevCharActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Action action = getAction(DefaultEditorKit.deletePrevCharAction);
JTextArea c = getInitedComponent(2, 7, "0123456789");
performAction(c, action);
@@ -700,6 +793,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testInsertContentActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Action action = getAction(DefaultEditorKit.insertContentAction);
JTextArea c = getInitedComponent(2, 7, "0123456789");
performAction(c, action, "aaa");
@@ -713,6 +810,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testCopyActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// TODO: Uncomment when Clipboard is fully supported
// DefaultEditorKit.CopyAction action = new DefaultEditorKit.CopyAction();
// putStringToClipboard("");
@@ -728,6 +829,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testCutActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// TODO: Uncomment when Clipboard is fully supported
// DefaultEditorKit.CutAction action = new DefaultEditorKit.CutAction();
// putStringToClipboard("");
@@ -744,6 +849,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testPasteActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// TODO: Uncomment when Clipboard is fully supported
// DefaultEditorKit.PasteAction action = new DefaultEditorKit.PasteAction();
// putStringToClipboard("98765");
@@ -753,6 +862,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testInsertTabActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
DefaultEditorKit.InsertTabAction action = new DefaultEditorKit.InsertTabAction();
JTextArea c = getInitedComponent(2, 7, "0123456789");
performAction(c, action);
@@ -760,6 +873,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testInsertBreakActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
DefaultEditorKit.InsertBreakAction action = new DefaultEditorKit.InsertBreakAction();
JTextArea c = getInitedComponent(2, 7, "0123456789");
performAction(c, action);
@@ -767,6 +884,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testDefaultKeyTypedActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
DefaultEditorKit.DefaultKeyTypedAction action = new DefaultEditorKit.DefaultKeyTypedAction();
JTextArea c = getInitedComponent(2, 7, "0123456789");
performAction(c, action, "asd");
@@ -774,12 +895,20 @@ public class DefaultEditorKit_Actions_Mu
}
public void testBeepActionPerformed() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
DefaultEditorKit.BeepAction action = new DefaultEditorKit.BeepAction();
JComponent c = new JPanel();
performAction(c, action);
}
public void testNextVisualPositionActionPerformedCaretForward() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "012345 6789\nasfd\nasd asd";
Action action = getAction(DefaultEditorKit.forwardAction);
JTextArea c = getInitedComponent(8, text);
@@ -797,6 +926,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testNextVisualPositionActionPerformedCaretBackward() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "012345 6789\nasfd\nasd asd";
Action action = getAction(DefaultEditorKit.backwardAction);
JTextArea c = getInitedComponent(8, text);
@@ -814,6 +947,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testNextVisualPositionActionPerformedSelectionForward() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "012345 6789\nasfd\nasd asd";
Action action = getAction(DefaultEditorKit.selectionForwardAction);
JTextArea c = getInitedComponent(8, text);
@@ -831,6 +968,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testNextVisualPositionActionPerformedSelectionBackward() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "012345 6789\nasfd\nasd asd";
Action action = getAction(DefaultEditorKit.selectionBackwardAction);
JTextArea c = getInitedComponent(8, text);
@@ -848,6 +989,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testNextVisualPositionActionPerformedCaretUp() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "012345 6789\nasfd\nasd asd";
Action action = getAction(DefaultEditorKit.upAction);
JTextArea c = getInitedComponent(15, text);
@@ -864,6 +1009,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testNextVisualPositionActionPerformedCaretDown() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "012345 6789\nasfd\nasd asd";
Action action = getAction(DefaultEditorKit.downAction);
JTextArea c = getInitedComponent(8, text);
@@ -886,6 +1035,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testNextVisualPositionActionPerformedSelectionUp() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "012345 6789\nasfd\nasd asd";
Action action = getAction(DefaultEditorKit.selectionUpAction);
JTextArea c = getInitedComponent(15, text);
@@ -902,6 +1055,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testNextVisualPositionActionPerformedSelectionDown() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String text = "012345 6789\nasfd\nasd asd";
Action action = getAction(DefaultEditorKit.selectionDownAction);
JTextArea c = getInitedComponent(8, text);
@@ -920,6 +1077,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testDefaultKeyTypedActionFiltering() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
HashSet<Character> nonTypingChars = new HashSet<Character>();
for (char i = 0; i < 32; i++) {
nonTypingChars.add(new Character(i));
@@ -945,6 +1106,10 @@ public class DefaultEditorKit_Actions_Mu
}
public void testConstants() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals("caret-backward", DefaultEditorKit.backwardAction);
assertEquals("beep", DefaultEditorKit.beepAction);
assertEquals("caret-begin", DefaultEditorKit.beginAction);
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultHighlighterTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultHighlighterTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultHighlighterTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultHighlighterTest.java Wed May 26 09:31:07 2010
@@ -22,6 +22,7 @@ package javax.swing.text;
import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.SwingTestCase;
+import tests.support.Support_Excludes;
public class DefaultHighlighterTest extends SwingTestCase {
JTextArea jta;
@@ -74,6 +75,10 @@ public class DefaultHighlighterTest exte
}
public void testDefaultHighlighter() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
DefaultHighlighter dh1 = new DefaultHighlighter();
assertNotNull(dh1);
}
@@ -86,6 +91,10 @@ public class DefaultHighlighterTest exte
}
public void testAddHighlightBadLocationException() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
bWasException = false;
try {
dh.addHighlight(-8, -1, lpnt);
@@ -107,6 +116,10 @@ public class DefaultHighlighterTest exte
}
public void testAddHighlight() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
obj1 = dh.addHighlight(1, 5, lpnt);
} catch (BadLocationException e) {
@@ -131,6 +144,10 @@ public class DefaultHighlighterTest exte
}
public void testInstall() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
obj1 = dh.addHighlight(1, 5, lpnt);
} catch (BadLocationException e) {
@@ -153,6 +170,10 @@ public class DefaultHighlighterTest exte
}
public void testDeinstall() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
obj1 = dh.addHighlight(1, 5, lpnt);
} catch (BadLocationException e) {
@@ -174,6 +195,10 @@ public class DefaultHighlighterTest exte
}
public void testChangeHighlight() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
obj1 = dh.addHighlight(1, 5, lpnt);
} catch (BadLocationException e) {
@@ -208,6 +233,10 @@ public class DefaultHighlighterTest exte
}
public void testChangeHighlightBadLocationException() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
bWasException = false;
try {
obj1 = dh.addHighlight(1, 5, lpnt);
@@ -237,6 +266,10 @@ public class DefaultHighlighterTest exte
}
public void testRemoveHighlight() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
obj1 = dh.addHighlight(1, 5, lpnt);
} catch (BadLocationException e) {
@@ -259,12 +292,20 @@ public class DefaultHighlighterTest exte
}
public void testSetGetDrawsLayeredHighlights() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertTrue(dh.getDrawsLayeredHighlights());
dh.setDrawsLayeredHighlights(false);
assertFalse(dh.getDrawsLayeredHighlights());
}
public void testRemoveAllHighlights() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
dh.addHighlight(0, 1, lpnt);
dh.addHighlight(0, 4, lpnt);
@@ -280,6 +321,10 @@ public class DefaultHighlighterTest exte
}
public void testGetHighlights() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
final int N = 50;
final int M = 25;
Object[] obj = new Object[N];
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultHighlighter_DefaultHighlightPainterTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultHighlighter_DefaultHighlightPainterTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultHighlighter_DefaultHighlightPainterTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultHighlighter_DefaultHighlightPainterTest.java Wed May 26 09:31:07 2010
@@ -30,6 +30,7 @@ import javax.swing.JTextArea;
import javax.swing.SwingWaitTestCase;
import junit.framework.AssertionFailedError;
import junit.framework.TestCase;
+import tests.support.Support_Excludes;
public class DefaultHighlighter_DefaultHighlightPainterTest extends TestCase {
JTextArea jta;
@@ -136,6 +137,10 @@ public class DefaultHighlighter_DefaultH
}
public void testDefaultHighlightPainter() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNotNull(lp);
assertEquals(Color.red, lp.getColor());
lp = new DefaultHighlighter.DefaultHighlightPainter(null);
@@ -158,6 +163,10 @@ public class DefaultHighlighter_DefaultH
}
/* hard link to coordinates
public void testPaintLayer() throws Exception{
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String s1;
String s2;
paintCase("JTextArea",5,7,new Rectangle(28,0,12,16));
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/FieldViewTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/FieldViewTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/FieldViewTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/FieldViewTest.java Wed May 26 09:31:07 2010
@@ -24,6 +24,7 @@ import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.SwingTestCase;
import javax.swing.plaf.basic.BasicTextUI;
+import tests.support.Support_Excludes;
public class FieldViewTest extends SwingTestCase {
JFrame jf;
@@ -50,6 +51,10 @@ public class FieldViewTest extends Swing
}
public void testGetPreferredSpan() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
FontMetrics fm = fv.getFontMetrics();
assertEquals(fm.getHeight(), (int) fv.getPreferredSpan(View.Y_AXIS));
assertEquals(fm.stringWidth(jtf.getText()), (int) fv.getPreferredSpan(View.X_AXIS));
@@ -60,12 +65,20 @@ public class FieldViewTest extends Swing
}
public void testGetResizeWeight() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(1, fv.getResizeWeight(View.X_AXIS));
assertEquals(0, fv.getResizeWeight(View.Y_AXIS));
assertEquals(0, fv.getResizeWeight(5000));
}
public void testGetFontMetrics() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(jtf.getFontMetrics(jtf.getFont()), fv.getFontMetrics());
jtf.setFont(new java.awt.Font("SimSun", 0, 12));
fv = (FieldView) ((BasicTextUI) jtf.getUI()).getRootView(jtf).getView(0);
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/FlowViewTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/FlowViewTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/FlowViewTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/FlowViewTest.java Wed May 26 09:31:07 2010
@@ -28,6 +28,7 @@ import javax.swing.event.DocumentEvent;
import javax.swing.text.FlowView.FlowStrategy;
import javax.swing.text.ViewTestHelpers.ChildrenFactory;
import javax.swing.text.ViewTestHelpers.ElementPartView;
+import tests.support.Support_Excludes;
/**
* Tests the majority of methods of FlowView class.
@@ -117,6 +118,10 @@ public class FlowViewTest extends BasicS
}
public void testSetParent() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(view.getParent());
assertNull(view.layoutPool);
assertEquals(0, view.getViewCount());
@@ -132,6 +137,10 @@ public class FlowViewTest extends BasicS
}
public void testSetParentWithFactory() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
view = new FlowViewImplWithFactory(root, View.Y_AXIS);
assertNull(view.getParent());
assertNull(view.layoutPool);
@@ -152,6 +161,10 @@ public class FlowViewTest extends BasicS
* elements.
*/
public void testGetViewIndexAtPositionEntire() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(0, view.getViewCount());
final ViewFactory vf = new ChildrenFactory();
final Element first = root.getElement(0);
@@ -175,6 +188,10 @@ public class FlowViewTest extends BasicS
* of elements.
*/
public void testGetViewIndexAtPositionPartial() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(0, view.getViewCount());
final ViewFactory vf = new ChildrenFactory();
final Element first = root.getElement(0);
@@ -198,6 +215,10 @@ public class FlowViewTest extends BasicS
}
public void testLoadChildren() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(view.layoutPool);
assertNull(view.getViewFactory());
view.loadChildren(new ChildrenFactory());
@@ -208,6 +229,10 @@ public class FlowViewTest extends BasicS
}
public void testLoadChildrenWithFactory() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
view = new FlowViewImplWithFactory(root, View.Y_AXIS);
assertNull(view.layoutPool);
assertNotNull(view.getViewFactory());
@@ -219,6 +244,10 @@ public class FlowViewTest extends BasicS
}
public void testLoadChildrenWithFactoryEmtpyPool() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
view = new FlowViewImplWithFactory(root, View.Y_AXIS);
assertNull(view.layoutPool);
assertNotNull(view.getViewFactory());
@@ -230,6 +259,10 @@ public class FlowViewTest extends BasicS
}
public void testLoadChildrenEmtpyPoolNullFactory() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
view = new FlowViewImplWithFactory(root, View.Y_AXIS);
assertNull(view.layoutPool);
assertNotNull(view.getViewFactory());
@@ -241,6 +274,10 @@ public class FlowViewTest extends BasicS
}
public void testLoadChildrenStrategy() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
final boolean[] called = new boolean[] { false };
view = new FlowViewImplWithFactory(root, View.Y_AXIS);
view.strategy = new FlowStrategy() {
@@ -258,6 +295,10 @@ public class FlowViewTest extends BasicS
}
public void testCalculateMinorAxisRequirements() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
view.layoutPool = new PlainView(root) {
@Override
public float getPreferredSpan(int axis) {
@@ -293,6 +334,10 @@ public class FlowViewTest extends BasicS
}
public void testLayout() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
final List<Integer> layoutChanges = new ArrayList<Integer>();
final Marker prefMarker = new Marker();
view = new FlowViewImplWithFactory(root, View.Y_AXIS) {
@@ -369,6 +414,10 @@ public class FlowViewTest extends BasicS
}
public void testFlowView() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertSame(root, view.getElement());
assertEquals(View.Y_AXIS, view.getAxis());
assertEquals(Short.MAX_VALUE, view.layoutSpan);
@@ -379,6 +428,10 @@ public class FlowViewTest extends BasicS
}
public void testGetFlowAxis() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(View.Y_AXIS, view.getAxis());
assertEquals(View.X_AXIS, view.getFlowAxis());
view = new FlowViewImpl(root, View.X_AXIS);
@@ -392,6 +445,10 @@ public class FlowViewTest extends BasicS
}
public void testGetFlowStart() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(0, view.getViewCount());
assertEquals(0, view.getFlowStart(0));
assertEquals(0, view.getFlowStart(1));
@@ -403,6 +460,10 @@ public class FlowViewTest extends BasicS
}
public void testGetFlowSpan() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(0, view.getViewCount());
assertEquals(Short.MAX_VALUE, view.layoutSpan);
view.layoutSpan = -10;
@@ -416,6 +477,10 @@ public class FlowViewTest extends BasicS
}
public void testGetSpanNoRow() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
view = new FlowViewImplWithFactory(root, View.Y_AXIS);
view.loadChildren(null);
assertEquals(0, view.getViewCount());
@@ -443,6 +508,10 @@ public class FlowViewTest extends BasicS
}
public void testGetSpanOneRowNoChildren() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
view = new FlowViewImplWithFactory(root, View.Y_AXIS);
view.loadChildren(null);
assertEquals(0, view.getViewCount());
@@ -472,6 +541,10 @@ public class FlowViewTest extends BasicS
}
public void testGetSpanOneRowOneChild() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
view = new FlowViewImplWithFactory(root, View.Y_AXIS);
view.loadChildren(null);
assertEquals(0, view.getViewCount());
@@ -502,6 +575,10 @@ public class FlowViewTest extends BasicS
}
public void testGetSpanNoRowFlexible() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ChildrenFactory factory = new ChildrenFactory();
factory.makeFlexible();
view = new FlowViewImplWithFactory(root, View.Y_AXIS, factory);
@@ -527,6 +604,10 @@ public class FlowViewTest extends BasicS
}
public void testGetSpanOneRowNoChildrenFlexible() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ChildrenFactory factory = new ChildrenFactory();
factory.makeFlexible();
view = new FlowViewImplWithFactory(root, View.Y_AXIS, factory);
@@ -554,6 +635,10 @@ public class FlowViewTest extends BasicS
}
public void testGetSpanOneRowOneChildFlexible() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ChildrenFactory factory = new ChildrenFactory();
factory.makeFlexible();
view = new FlowViewImplWithFactory(root, View.Y_AXIS, factory);
@@ -583,6 +668,10 @@ public class FlowViewTest extends BasicS
}
public void testGetAttributesLayoutPool() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
view = new FlowViewImplWithFactory(root, View.Y_AXIS);
view.loadChildren(null);
assertSame(view.getAttributes(), view.layoutPool.getAttributes());
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/GapContentTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/GapContentTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/GapContentTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/GapContentTest.java Wed May 26 09:31:07 2010
@@ -27,6 +27,7 @@ import java.util.List;
import java.util.Vector;
import javax.swing.BasicSwingTestCase;
import javax.swing.undo.UndoableEdit;
+import tests.support.Support_Excludes;
public class GapContentTest extends AbstractDocument_ContentTest {
protected AbstractDocument.Content content;
@@ -39,6 +40,10 @@ public class GapContentTest extends Abst
}
public void testGetPositionsInRangeVector() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Vector<Object> v = new Vector<Object>();
v.add(new Object());
v.add(new Object());
@@ -56,6 +61,10 @@ public class GapContentTest extends Abst
}
public void testGetPositionsInRange() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Vector<Position> pos = new Vector<Position>();
for (int i = 0; i < content.length(); i += 2) {
Position p = content.createPosition(i);
@@ -77,6 +86,10 @@ public class GapContentTest extends Abst
}
public void testUpdatePositions() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
GapContent cont1 = new GapContent();
final Vector<Position> pos = new Vector<Position>();
final int posSize = 5;
@@ -119,12 +132,20 @@ public class GapContentTest extends Abst
* the returned vector.
*/
public void testGetPositionsInRangeEnd() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
content.createPosition(10);
Vector<?> v = ((GapContent) content).getPositionsInRange(null, 0, 10);
assertEquals(1, v.size());
}
public void testPositionGC() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Vector<WeakReference<Position>> pos = new Vector<WeakReference<Position>>(10);
ReferenceQueue<Position> rq = new ReferenceQueue<Position>();
for (int i = 0; i < content.length(); i += 2) {
@@ -158,11 +179,19 @@ public class GapContentTest extends Abst
@Override
public void testGetCharsAfterGap() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
super.testGetCharsAfterGap();
isContentArraySame(true);
}
public void testGetCharsAfterGapNoImplied() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// Move the gap
obj.insertString(10, "big ");
// Don't include the implied char
@@ -173,17 +202,29 @@ public class GapContentTest extends Abst
@Override
public void testGetCharsBeforeGap() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
super.testGetCharsBeforeGap();
isContentArraySame(true);
}
@Override
public void testGetCharsFullLength() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
super.testGetCharsFullLength();
isContentArraySame(false);
}
public void testGetCharsFullActualLength() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
obj.getChars(0, obj.length() - 1, text);
assertEquals("This is a test string.", text.toString());
isContentArraySame(true);
@@ -191,11 +232,19 @@ public class GapContentTest extends Abst
@Override
public void testGetCharsImpliedChar() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
super.testGetCharsImpliedChar();
isContentArraySame(false);
}
public void testGetCharsImpliedCharPartial() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
obj = content = new GapContent();
assertEquals(1, content.length());
text.setPartialReturn(false);
@@ -210,18 +259,30 @@ public class GapContentTest extends Abst
@Override
public void testGetCharsPartial() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
super.testGetCharsPartial();
isContentArraySame(true);
}
@Override
public void testGetCharsWithGap() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
super.testGetCharsWithGap();
isContentArraySame(false);
}
// Regression for HARMONY-2566
public void testGetCharsMaxInteger() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
content.getChars(1, Integer.MAX_VALUE, null);
fail("BadLocationException is expected");
@@ -230,6 +291,10 @@ public class GapContentTest extends Abst
}
public void testGetCharsNullSegment() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
content.getChars(1, 1, null);
fail("NullPointerException is expected");
@@ -238,6 +303,10 @@ public class GapContentTest extends Abst
}
public void testCreatePositionBeforeUndo() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
UndoableEdit ue = content.remove(3, 8);
Position pos = content.createPosition(3);
assertEquals(3, pos.getOffset());
@@ -248,6 +317,10 @@ public class GapContentTest extends Abst
}
public void testCreatePositionAfterUndone() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
UndoableEdit ue = content.remove(3, 8);
ue.undo();
Position pos = content.createPosition(5);
@@ -259,6 +332,10 @@ public class GapContentTest extends Abst
}
public void testCreatePositionAfterInsert() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
UndoableEdit ue = content.insertString(10, "big ");
Position pos = content.createPosition(12);
assertEquals(12, pos.getOffset());
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/GapContent_InternalTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/GapContent_InternalTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/GapContent_InternalTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/GapContent_InternalTest.java Wed May 26 09:31:07 2010
@@ -21,6 +21,7 @@ package javax.swing.text;
import java.util.List;
import javax.swing.BasicSwingTestCase;
+import tests.support.Support_Excludes;
/**
* Tests some internal functionality of GapContent but not its methods.
@@ -36,6 +37,10 @@ public class GapContent_InternalTest ext
}
public void testBufferExpansion() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (!isHarmony()) {
return;
}
@@ -50,6 +55,10 @@ public class GapContent_InternalTest ext
}
public void testInsertPosition() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (!isHarmony()) {
return;
}
@@ -75,6 +84,10 @@ public class GapContent_InternalTest ext
* @throws BadLocationException
*/
public void testPositionSort() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (!isHarmony()) {
return;
}
@@ -96,6 +109,10 @@ public class GapContent_InternalTest ext
}
public void testPositionGC() throws BadLocationException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (!isHarmony()) {
return;
}
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/GlyphView_AttributesTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/GlyphView_AttributesTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/GlyphView_AttributesTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/GlyphView_AttributesTest.java Wed May 26 09:31:07 2010
@@ -24,6 +24,7 @@ import java.awt.Container;
import java.awt.Font;
import javax.swing.JTextArea;
import junit.framework.TestCase;
+import tests.support.Support_Excludes;
/**
* Tests GlyphView class, its methods to get attributes.
@@ -145,6 +146,10 @@ public class GlyphView_AttributesTest ex
}
public void testGetForeground() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertSame(StyleConstants.getForeground(leaf.getAttributes()), styledView
.getForeground());
assertCalledMethods(FORE);
@@ -158,6 +163,10 @@ public class GlyphView_AttributesTest ex
}
public void testGetBackground() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(styledView.getBackground());
assertCalledMethods(NONE);
assertNull(styledWithParent.getBackground());
@@ -174,6 +183,10 @@ public class GlyphView_AttributesTest ex
}
public void testGetFont() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Font font = styledView.getFont();
assertEquals(StyleConstants.getFontFamily(leaf.getAttributes()), font.getFamily());
assertEquals(StyleConstants.getFontSize(leaf.getAttributes()), font.getSize());
@@ -189,6 +202,10 @@ public class GlyphView_AttributesTest ex
}
public void testIsUnderline() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertFalse(styledView.isUnderline());
assertFalse(styledWithParent.isUnderline());
assertFalse(plainView.isUnderline());
@@ -199,6 +216,10 @@ public class GlyphView_AttributesTest ex
}
public void testIsStrikeThrough() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertFalse(styledView.isStrikeThrough());
assertFalse(styledWithParent.isStrikeThrough());
assertFalse(plainView.isUnderline());
@@ -209,6 +230,10 @@ public class GlyphView_AttributesTest ex
}
public void testIsSubscript() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertFalse(styledView.isSubscript());
assertFalse(styledWithParent.isSubscript());
assertFalse(plainView.isSubscript());
@@ -219,6 +244,10 @@ public class GlyphView_AttributesTest ex
}
public void testIsSuperscript() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertFalse(styledView.isSuperscript());
assertFalse(styledWithParent.isSuperscript());
assertFalse(plainView.isSuperscript());
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/InternationalFormatterTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/InternationalFormatterTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/InternationalFormatterTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/InternationalFormatterTest.java Wed May 26 09:31:07 2010
@@ -25,6 +25,7 @@ import java.text.NumberFormat;
import java.text.ParseException;
import javax.swing.JFormattedTextField;
import javax.swing.SwingTestCase;
+import tests.support.Support_Excludes;
public class InternationalFormatterTest extends SwingTestCase {
InternationalFormatter formatter;
@@ -67,11 +68,19 @@ public class InternationalFormatterTest
}
public void testInternationalFormatter() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(formatter.getFormat());
checkMainProperties();
}
public void testInternationalFormatterFormat() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Format format = NumberFormat.getNumberInstance();
formatter = new InternationalFormatter(format);
assertEquals(format, formatter.getFormat());
@@ -79,6 +88,10 @@ public class InternationalFormatterTest
}
public void testClone() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Object clone = null;
formatter.install(ftf);
formatter.setValueClass(Integer.class);
@@ -107,9 +120,17 @@ public class InternationalFormatterTest
}
public void testGetActions() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
}
public void testStringToValue() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(formatter.getFormat());
assertNull(formatter.getValueClass());
try {
@@ -153,6 +174,10 @@ public class InternationalFormatterTest
}
public void testValueToString() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
assertEquals("", formatter.valueToString(null));
Object value;
@@ -174,6 +199,10 @@ public class InternationalFormatterTest
}
public void testGetFields() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ftf.setValue(new Integer(345));
formatter = (InternationalFormatter) ftf.getFormatter();
Format format = formatter.getFormat();
@@ -188,12 +217,20 @@ public class InternationalFormatterTest
}
public void testSetGetFormat() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Format format = NumberFormat.getCurrencyInstance();
formatter.setFormat(format);
assertEquals(format, formatter.getFormat());
}
public void testSetGetMaximum() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Integer max = new Integer(35);
Integer min = new Integer(40);
formatter.setMaximum(max);
@@ -203,6 +240,10 @@ public class InternationalFormatterTest
}
public void testSetGetMinimum() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Integer max = new Integer(10);
Integer min = new Integer(20);
formatter.setMinimum(min);