< prev index next >
modules/graphics/src/test/java/test/javafx/scene/bounds/GroupBoundsTest.java
Print this page
*** 23,32 ****
--- 23,33 ----
* questions.
*/
package test.javafx.scene.bounds;
+ import com.sun.javafx.scene.NodeHelper;
import static test.com.sun.javafx.test.TestHelper.assertBoundsEqual;
import static test.com.sun.javafx.test.TestHelper.assertGroupBounds;
import static test.com.sun.javafx.test.TestHelper.box;
import static test.com.sun.javafx.test.TestHelper.formatBounds;
import static junit.framework.Assert.assertEquals;
*** 466,484 ****
}
}
}
}
! // here is a special test for impl_getPivotX and impl_getPivotY
@Test
public void testPivotXAndPivotY() {
Rectangle rect = new Rectangle(100, 100);
! assertEquals(50.0f, (float) rect.impl_getPivotX());
! assertEquals(50.0f, (float) rect.impl_getPivotY());
rect.setWidth(70.0f);
! assertEquals(35.0f, (float) rect.impl_getPivotX());
! assertEquals(50.0f, (float) rect.impl_getPivotY());
}
/***************************************************************************
* Group Bounds Sanity Tests * * These tests are for Group
* to make sure that their * bounds are reported correctly
--- 467,485 ----
}
}
}
}
! // here is a special test for getPivotX and getPivotY
@Test
public void testPivotXAndPivotY() {
Rectangle rect = new Rectangle(100, 100);
! assertEquals(50.0f, (float) NodeHelper.getPivotX(rect));
! assertEquals(50.0f, (float) NodeHelper.getPivotY(rect));
rect.setWidth(70.0f);
! assertEquals(35.0f, (float) NodeHelper.getPivotX(rect));
! assertEquals(50.0f, (float) NodeHelper.getPivotY(rect));
}
/***************************************************************************
* Group Bounds Sanity Tests * * These tests are for Group
* to make sure that their * bounds are reported correctly
< prev index next >