You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by nd...@apache.org on 2006/10/19 07:18:24 UTC
svn commit: r465495 [5/5] - in
/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common:
java/awt/ java/awt/color/ java/awt/datatransfer/ java/awt/dnd/
java/awt/event/ java/awt/font/ java/awt/geom/ java/awt/image/
org/apache/harm...
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/render/JavaBlitterTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/render/JavaBlitterTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/render/JavaBlitterTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/render/JavaBlitterTest.java Wed Oct 18 22:18:19 2006
@@ -50,6 +50,7 @@
super(name);
}
+ @Override
protected void setUp() throws Exception {
super.setUp();
w = 100;
@@ -600,61 +601,101 @@
for(int y = 0; y < h/2; y++){
for(int x = 0; x < w/2; x++){
- if(i + w <= 0) assertEquals(0xff000000, dst.getRGB(x, y));
- else if(i + w < w/2){
- if(x < w + i) assertEquals(0xff00ff00, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(i + w <= 0) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else if(i + w < w/2){
+ if(x < w + i) {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}else if(i + w < w){
- if(x < i + w/2) assertEquals(0xffff0000, dst.getRGB(x, y));
- else assertEquals(0xff00ff00, dst.getRGB(x, y));
+ if(x < i + w/2) {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ }
}else{
- if(x < i) assertEquals(0xff000000, dst.getRGB(x, y));
- else assertEquals(0xffff0000, dst.getRGB(x, y));
+ if(x < i) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ }
}
}
}
for(int y = 0; y < h/2; y++){
for(int x = w/2; x < w; x++){
- if(i + w < w/2) assertEquals(0xff000000, dst.getRGB(x, y));
- else if(i + w < w){
- if(x < w + i) assertEquals(0xff00ff00, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(i + w < w/2) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else if(i + w < w){
+ if(x < w + i) {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}else if(i < w/2){
- if(x < i + w/2) assertEquals(0xffff0000, dst.getRGB(x, y));
- else assertEquals(0xff00ff00, dst.getRGB(x, y));
+ if(x < i + w/2) {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ }
}else{
- if(x < i) assertEquals(0xff000000, dst.getRGB(x, y));
- else assertEquals(0xffff0000, dst.getRGB(x, y));
+ if(x < i) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ }
}
}
}
for(int y = h/2; y < h; y++){
for(int x = 0; x < w/2; x++){
- if(i + w <= 0) assertEquals(0xff000000, dst.getRGB(x, y));
- else if(i + w < w/2){
- if(x < w + i) assertEquals(0xffffffff, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(i + w <= 0) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else if(i + w < w/2){
+ if(x < w + i) {
+ assertEquals(0xffffffff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}else if(i + w < w){
- if(x < i + w/2) assertEquals(0xff0000ff, dst.getRGB(x, y));
- else assertEquals(0xffffffff, dst.getRGB(x, y));
+ if(x < i + w/2) {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xffffffff, dst.getRGB(x, y));
+ }
}else{
- if(x < i) assertEquals(0xff000000, dst.getRGB(x, y));
- else assertEquals(0xff0000ff, dst.getRGB(x, y));
+ if(x < i) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ }
}
}
}
for(int y = h/2; y < h; y++){
for(int x = w/2; x < w; x++){
- if(i + w < w/2) assertEquals(0xff000000, dst.getRGB(x, y));
- else if(i + w < w){
- if(x < w + i) assertEquals(0xffffffff, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(i + w < w/2) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else if(i + w < w){
+ if(x < w + i) {
+ assertEquals(0xffffffff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}else if(i < w/2){
- if(x < i + w/2) assertEquals(0xff0000ff, dst.getRGB(x, y));
- else assertEquals(0xffffffff, dst.getRGB(x, y));
+ if(x < i + w/2) {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xffffffff, dst.getRGB(x, y));
+ }
}else{
- if(x < i) assertEquals(0xff000000, dst.getRGB(x, y));
- else assertEquals(0xff0000ff, dst.getRGB(x, y));
+ if(x < i) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ }
}
}
}
@@ -673,46 +714,76 @@
for(int y = 0; y < h/2; y++){
for(int x = 0; x < w/2; x++){
- if(i + h <= 0) assertEquals(0xff000000, dst.getRGB(x, y));
- else if(i + h < h/2){
- if(y < h + i) assertEquals(0xff0000ff, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(i + h <= 0) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else if(i + h < h/2){
+ if(y < h + i) {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}else if(i + h < h){
- if(y < i + h/2) assertEquals(0xffff0000, dst.getRGB(x, y));
- else assertEquals(0xff0000ff, dst.getRGB(x, y));
+ if(y < i + h/2) {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ }
}else{
- if(y < i) assertEquals(0xff000000, dst.getRGB(x, y));
- else assertEquals(0xffff0000, dst.getRGB(x, y));
+ if(y < i) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ }
}
}
}
for(int y = 0; y < h/2; y++){
for(int x = w/2; x < w; x++){
- if(i + h <= 0) assertEquals(0xff000000, dst.getRGB(x, y));
- else if(i + h < h/2){
- if(y < h + i) assertEquals(0xffffffff, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(i + h <= 0) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else if(i + h < h/2){
+ if(y < h + i) {
+ assertEquals(0xffffffff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}else if(i + h < h){
- if(y < i + h/2) assertEquals(0xff00ff00, dst.getRGB(x, y));
- else assertEquals(0xffffffff, dst.getRGB(x, y));
+ if(y < i + h/2) {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xffffffff, dst.getRGB(x, y));
+ }
}else{
- if(y < i) assertEquals(0xff000000, dst.getRGB(x, y));
- else assertEquals(0xff00ff00, dst.getRGB(x, y));
+ if(y < i) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ }
}
}
}
for(int y = h/2; y < h; y++){
for(int x = 0; x < w/2; x++){
- if(i + h < h/2) assertEquals(0xff000000, dst.getRGB(x, y));
- else if(i + h < h){
- if(y < i + h) assertEquals(0xff0000ff, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(i + h < h/2) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else if(i + h < h){
+ if(y < i + h) {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}else if(i < h/2){
- if(y < i + h/2) assertEquals(0xffff0000, dst.getRGB(x, y));
- else assertEquals(0xff0000ff, dst.getRGB(x, y));
+ if(y < i + h/2) {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ }
}else if(i < h){
- if(y < i) assertEquals(0xff000000, dst.getRGB(x, y));
- else assertEquals(0xffff0000, dst.getRGB(x, y));
+ if(y < i) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ }
}else{
assertEquals(0xff000000, dst.getRGB(x, y));
}
@@ -720,16 +791,26 @@
}
for(int y = h/2; y < h; y++){
for(int x = w/2; x < w; x++){
- if(i + h < h/2) assertEquals(0xff000000, dst.getRGB(x, y));
- else if(i + h < h){
- if(y < i + h) assertEquals(0xffffffff, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(i + h < h/2) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else if(i + h < h){
+ if(y < i + h) {
+ assertEquals(0xffffffff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}else if(i < h/2){
- if(y < i + h/2) assertEquals(0xff00ff00, dst.getRGB(x, y));
- else assertEquals(0xffffffff, dst.getRGB(x, y));
+ if(y < i + h/2) {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xffffffff, dst.getRGB(x, y));
+ }
}else if(i < h){
- if(y < i) assertEquals(0xff000000, dst.getRGB(x, y));
- else assertEquals(0xff00ff00, dst.getRGB(x, y));
+ if(y < i) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ }
}else{
assertEquals(0xff000000, dst.getRGB(x, y));
}
@@ -753,61 +834,101 @@
for(int y = 0; y < h/2; y++){
for(int x = 0; x < w/2; x++){
- if(i + w <= 0) assertEquals(0xff000000, dst.getRGB(x, y));
- else if(i + w < w/2){
- if(x < w + i) assertEquals(0xff00ff00, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(i + w <= 0) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else if(i + w < w/2){
+ if(x < w + i) {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}else if(i + w < w){
- if(x < i + w/2) assertEquals(0xffff0000, dst.getRGB(x, y));
- else assertEquals(0xff00ff00, dst.getRGB(x, y));
+ if(x < i + w/2) {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ }
}else{
- if(x < i) assertEquals(0xff000000, dst.getRGB(x, y));
- else assertEquals(0xffff0000, dst.getRGB(x, y));
+ if(x < i) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ }
}
}
}
for(int y = 0; y < h/2; y++){
for(int x = w/2; x < w; x++){
- if(i + w < w/2) assertEquals(0xff000000, dst.getRGB(x, y));
- else if(i + w < w){
- if(x < w + i) assertEquals(0xff00ff00, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(i + w < w/2) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else if(i + w < w){
+ if(x < w + i) {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}else if(i < w/2){
- if(x < i + w/2) assertEquals(0xffff0000, dst.getRGB(x, y));
- else assertEquals(0xff00ff00, dst.getRGB(x, y));
+ if(x < i + w/2) {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ }
}else{
- if(x < i) assertEquals(0xff000000, dst.getRGB(x, y));
- else assertEquals(0xffff0000, dst.getRGB(x, y));
+ if(x < i) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ }
}
}
}
for(int y = h/2; y < h; y++){
for(int x = 0; x < w/2; x++){
- if(i + w <= 0) assertEquals(0xff000000, dst.getRGB(x, y));
- else if(i + w < w/2){
- if(x < w + i) assertEquals(0xffffffff, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(i + w <= 0) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else if(i + w < w/2){
+ if(x < w + i) {
+ assertEquals(0xffffffff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}else if(i + w < w){
- if(x < i + w/2) assertEquals(0xff0000ff, dst.getRGB(x, y));
- else assertEquals(0xffffffff, dst.getRGB(x, y));
+ if(x < i + w/2) {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xffffffff, dst.getRGB(x, y));
+ }
}else{
- if(x < i) assertEquals(0xff000000, dst.getRGB(x, y));
- else assertEquals(0xff0000ff, dst.getRGB(x, y));
+ if(x < i) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ }
}
}
}
for(int y = h/2; y < h; y++){
for(int x = w/2; x < w; x++){
- if(i + w < w/2) assertEquals(0xff000000, dst.getRGB(x, y));
- else if(i + w < w){
- if(x < w + i) assertEquals(0xffffffff, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(i + w < w/2) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else if(i + w < w){
+ if(x < w + i) {
+ assertEquals(0xffffffff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}else if(i < w/2){
- if(x < i + w/2) assertEquals(0xff0000ff, dst.getRGB(x, y));
- else assertEquals(0xffffffff, dst.getRGB(x, y));
+ if(x < i + w/2) {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xffffffff, dst.getRGB(x, y));
+ }
}else{
- if(x < i) assertEquals(0xff000000, dst.getRGB(x, y));
- else assertEquals(0xff0000ff, dst.getRGB(x, y));
+ if(x < i) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ }
}
}
}
@@ -829,46 +950,76 @@
for(int y = 0; y < h/2; y++){
for(int x = 0; x < w/2; x++){
- if(i + h <= 0) assertEquals(0xff000000, dst.getRGB(x, y));
- else if(i + h < h/2){
- if(y < h + i) assertEquals(0xff0000ff, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(i + h <= 0) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else if(i + h < h/2){
+ if(y < h + i) {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}else if(i + h < h){
- if(y < i + h/2) assertEquals(0xffff0000, dst.getRGB(x, y));
- else assertEquals(0xff0000ff, dst.getRGB(x, y));
+ if(y < i + h/2) {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ }
}else{
- if(y < i) assertEquals(0xff000000, dst.getRGB(x, y));
- else assertEquals(0xffff0000, dst.getRGB(x, y));
+ if(y < i) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ }
}
}
}
for(int y = 0; y < h/2; y++){
for(int x = w/2; x < w; x++){
- if(i + h <= 0) assertEquals(0xff000000, dst.getRGB(x, y));
- else if(i + h < h/2){
- if(y < h + i) assertEquals(0xffffffff, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(i + h <= 0) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else if(i + h < h/2){
+ if(y < h + i) {
+ assertEquals(0xffffffff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}else if(i + h < h){
- if(y < i + h/2) assertEquals(0xff00ff00, dst.getRGB(x, y));
- else assertEquals(0xffffffff, dst.getRGB(x, y));
+ if(y < i + h/2) {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xffffffff, dst.getRGB(x, y));
+ }
}else{
- if(y < i) assertEquals(0xff000000, dst.getRGB(x, y));
- else assertEquals(0xff00ff00, dst.getRGB(x, y));
+ if(y < i) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ }
}
}
}
for(int y = h/2; y < h; y++){
for(int x = 0; x < w/2; x++){
- if(i + h < h/2) assertEquals(0xff000000, dst.getRGB(x, y));
- else if(i + h < h){
- if(y < i + h) assertEquals(0xff0000ff, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(i + h < h/2) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else if(i + h < h){
+ if(y < i + h) {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}else if(i < h/2){
- if(y < i + h/2) assertEquals(0xffff0000, dst.getRGB(x, y));
- else assertEquals(0xff0000ff, dst.getRGB(x, y));
+ if(y < i + h/2) {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ }
}else if(i < h){
- if(y < i) assertEquals(0xff000000, dst.getRGB(x, y));
- else assertEquals(0xffff0000, dst.getRGB(x, y));
+ if(y < i) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ }
}else{
assertEquals(0xff000000, dst.getRGB(x, y));
}
@@ -876,16 +1027,26 @@
}
for(int y = h/2; y < h; y++){
for(int x = w/2; x < w; x++){
- if(i + h < h/2) assertEquals(0xff000000, dst.getRGB(x, y));
- else if(i + h < h){
- if(y < i + h) assertEquals(0xffffffff, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(i + h < h/2) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else if(i + h < h){
+ if(y < i + h) {
+ assertEquals(0xffffffff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}else if(i < h/2){
- if(y < i + h/2) assertEquals(0xff00ff00, dst.getRGB(x, y));
- else assertEquals(0xffffffff, dst.getRGB(x, y));
+ if(y < i + h/2) {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xffffffff, dst.getRGB(x, y));
+ }
}else if(i < h){
- if(y < i) assertEquals(0xff000000, dst.getRGB(x, y));
- else assertEquals(0xff00ff00, dst.getRGB(x, y));
+ if(y < i) {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ }
}else{
assertEquals(0xff000000, dst.getRGB(x, y));
}
@@ -921,26 +1082,38 @@
for(int y = 0; y < h/2; y++){
for(int x = 0; x < w/2; x++){
- if(x >= w/4 && y >= h/4) assertEquals(0xffff0000, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(x >= w/4 && y >= h/4) {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}
}
for(int y = 0; y < h/2; y++){
for(int x = w/2; x < w; x++){
- if(x < w/2 + w/4 && y >= h/4) assertEquals(0xff00ff00, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(x < w/2 + w/4 && y >= h/4) {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}
}
for(int y = h/2; y < h; y++){
for(int x = 0; x < w/2; x++){
- if(x >= w/4 && y < h/2 + h/4) assertEquals(0xff0000ff, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(x >= w/4 && y < h/2 + h/4) {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}
}
for(int y = h/2; y < h; y++){
for(int x = w/2; x < w; x++){
- if(x < w/2 + w/4 && y < h/2 + h/4) assertEquals(0xffffffff, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(x < w/2 + w/4 && y < h/2 + h/4) {
+ assertEquals(0xffffffff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}
}
@@ -959,20 +1132,29 @@
for(int y = 0; y < h/2; y++){
for(int x = 0; x < w/2; x++){
- if(x >= w/4 && y >= h/4) assertEquals(0xffff0000, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(x >= w/4 && y >= h/4) {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}
}
for(int y = 0; y < h/2; y++){
for(int x = w/2; x < w; x++){
- if(x < w/2 + w/4 && y >= h/4) assertEquals(0xff00ff00, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(x < w/2 + w/4 && y >= h/4) {
+ assertEquals(0xff00ff00, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}
}
for(int y = h/2; y < h; y++){
for(int x = 0; x < w/2; x++){
- if(x >= w/4 && y < h/2 + h/4) assertEquals(0xff0000ff, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(x >= w/4 && y < h/2 + h/4) {
+ assertEquals(0xff0000ff, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}
}
for(int y = h/2; y < h; y++){
@@ -998,8 +1180,11 @@
for(int y = 0; y < h; y++){
for(int x = 0; x < w; x++){
- if(x == w/4 && y == h/4) assertEquals(0xffff0000, dst.getRGB(x, y));
- else assertEquals(0xff000000, dst.getRGB(x, y));
+ if(x == w/4 && y == h/4) {
+ assertEquals(0xffff0000, dst.getRGB(x, y));
+ } else {
+ assertEquals(0xff000000, dst.getRGB(x, y));
+ }
}
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/FontRenderContextTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/FontRenderContextTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/FontRenderContextTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/FontRenderContextTest.java Wed Oct 18 22:18:19 2006
@@ -33,11 +33,13 @@
super(name);
}
+ @Override
protected void setUp() throws Exception {
super.setUp();
frc = new FontRenderContext(at, isAA, usesFractionalMetrics);
}
+ @Override
protected void tearDown() throws Exception {
super.tearDown();
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/GlyphJustificationInfoTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/GlyphJustificationInfoTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/GlyphJustificationInfoTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/GlyphJustificationInfoTest.java Wed Oct 18 22:18:19 2006
@@ -31,19 +31,7 @@
int shrinkPriority = GlyphJustificationInfo.PRIORITY_WHITESPACE;
float shrinkLeftLimit = 20;
float shrinkRightLimit = 20;
-
- public GlyphJustificationInfoTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
/*
* Test method for 'java.awt.font.GlyphJustificationInfo.GlyphJustificationInfo(float, boolean, int, float, float, boolean, int, float, float)'
@@ -53,15 +41,15 @@
growPriority, growLeftLimit, growRightLimit, shrinkAbsorb,
shrinkPriority, shrinkLeftLimit, shrinkRightLimit);
- assertEquals("weight", weight, gji.weight);
+ assertEquals("weight", weight, gji.weight, 0F);
assertEquals("growAbsorb", growAbsorb, gji.growAbsorb);
assertEquals("growPriority", growPriority, gji.growPriority);
- assertEquals("growLeftLimit", growLeftLimit, gji.growLeftLimit);
- assertEquals("growRightLimit", growRightLimit, gji.growRightLimit);
+ assertEquals("growLeftLimit", growLeftLimit, gji.growLeftLimit, 0F);
+ assertEquals("growRightLimit", growRightLimit, gji.growRightLimit, 0F);
assertEquals("shrinkAbsorb", shrinkAbsorb, gji.shrinkAbsorb);
assertEquals("shrinkPriority", shrinkPriority, gji.shrinkPriority);
- assertEquals("shrinkLeftLimit", shrinkLeftLimit, gji.shrinkLeftLimit);
- assertEquals("shrinkRightLimit", shrinkRightLimit, gji.shrinkRightLimit);
+ assertEquals("shrinkLeftLimit", shrinkLeftLimit, gji.shrinkLeftLimit, 0F);
+ assertEquals("shrinkRightLimit", shrinkRightLimit, gji.shrinkRightLimit, 0F);
}
@@ -69,11 +57,10 @@
* Test method for 'java.awt.font.GlyphJustificationInfo.GlyphJustificationInfo(float, boolean, int, float, float, boolean, int, float, float)'
*/
public final void testGlyphJustificationInfo_parametersCheck() {
- GlyphJustificationInfo gji;
// negative weight
try{
- gji = new GlyphJustificationInfo(-1, growAbsorb,
+ new GlyphJustificationInfo(-1, growAbsorb,
growPriority, growLeftLimit, growRightLimit, shrinkAbsorb,
shrinkPriority, shrinkLeftLimit, shrinkRightLimit);
fail("IllegalArgumentException expected");
@@ -83,7 +70,7 @@
// growPriority illegal level value
try{
- gji = new GlyphJustificationInfo(weight, growAbsorb,
+ new GlyphJustificationInfo(weight, growAbsorb,
5, growLeftLimit, growRightLimit, shrinkAbsorb,
shrinkPriority, shrinkLeftLimit, shrinkRightLimit);
fail("IllegalArgumentException expected");
@@ -92,7 +79,7 @@
}
try{
- gji = new GlyphJustificationInfo(weight, growAbsorb,
+ new GlyphJustificationInfo(weight, growAbsorb,
-1, growLeftLimit, growRightLimit, shrinkAbsorb,
shrinkPriority, shrinkLeftLimit, shrinkRightLimit);
fail("IllegalArgumentException expected");
@@ -102,7 +89,7 @@
// negative growLeftLimit
try{
- gji = new GlyphJustificationInfo(weight, growAbsorb,
+ new GlyphJustificationInfo(weight, growAbsorb,
growPriority, -1, growRightLimit, shrinkAbsorb,
shrinkPriority, shrinkLeftLimit, shrinkRightLimit);
fail("IllegalArgumentException expected");
@@ -112,7 +99,7 @@
// negative growRightLimit
try{
- gji = new GlyphJustificationInfo(weight, growAbsorb,
+ new GlyphJustificationInfo(weight, growAbsorb,
growPriority, growLeftLimit, -1, shrinkAbsorb,
shrinkPriority, shrinkLeftLimit, shrinkRightLimit);
fail("IllegalArgumentException expected");
@@ -122,7 +109,7 @@
// shrinkPriority illegal level value
try{
- gji = new GlyphJustificationInfo(weight, growAbsorb,
+ new GlyphJustificationInfo(weight, growAbsorb,
growPriority, growLeftLimit, growRightLimit, shrinkAbsorb,
5, shrinkLeftLimit, shrinkRightLimit);
fail("IllegalArgumentException expected");
@@ -131,7 +118,7 @@
}
try{
- gji = new GlyphJustificationInfo(weight, growAbsorb,
+ new GlyphJustificationInfo(weight, growAbsorb,
growPriority, growLeftLimit, growRightLimit, shrinkAbsorb,
-1, shrinkLeftLimit, shrinkRightLimit);
fail("IllegalArgumentException expected");
@@ -141,7 +128,7 @@
// negative shrinkLeftLimit
try{
- gji = new GlyphJustificationInfo(weight, growAbsorb,
+ new GlyphJustificationInfo(weight, growAbsorb,
growPriority, growLeftLimit, growRightLimit, shrinkAbsorb,
shrinkPriority, -1, shrinkRightLimit);
fail("IllegalArgumentException expected");
@@ -151,7 +138,7 @@
// negative shrinkRightLimit
try{
- gji = new GlyphJustificationInfo(weight, growAbsorb,
+ new GlyphJustificationInfo(weight, growAbsorb,
growPriority, growLeftLimit, growRightLimit, shrinkAbsorb,
shrinkPriority, -1, shrinkRightLimit);
fail("IllegalArgumentException expected");
@@ -159,7 +146,6 @@
// expected
}
-
}
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/GlyphMetricsTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/GlyphMetricsTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/GlyphMetricsTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/GlyphMetricsTest.java Wed Oct 18 22:18:19 2006
@@ -26,18 +26,6 @@
float advance = 10;
Rectangle2D.Float bounds = new Rectangle2D.Float(2, 2, 15, 15);
byte glyphType = GlyphMetrics.COMPONENT;
-
- public GlyphMetricsTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
/*
* Test method for 'java.awt.font.GlyphMetrics.GlyphMetrics(boolean, float, float, Rectangle2D, byte)'
@@ -48,10 +36,10 @@
float advanceY = 5;
GlyphMetrics gm = new GlyphMetrics(horizontal, advanceX, advanceY, bounds, glyphType);
assertEquals(bounds, gm.getBounds2D());
- assertEquals(advanceY, gm.getAdvance());
+ assertEquals(advanceY, gm.getAdvance(), 0F);
assertEquals(glyphType, gm.getType());
- assertEquals(advanceX, gm.getAdvanceX());
- assertEquals(advanceY, gm.getAdvanceY());
+ assertEquals(advanceX, gm.getAdvanceX(), 0F);
+ assertEquals(advanceY, gm.getAdvanceY(), 0F);
}
/*
@@ -60,7 +48,7 @@
public final void testGlyphMetricsFloatRectangle2DByte() {
GlyphMetrics gm = new GlyphMetrics(advance, bounds, glyphType);
assertEquals(bounds, gm.getBounds2D());
- assertEquals(advance, gm.getAdvance());
+ assertEquals(advance, gm.getAdvance(), 0F);
assertEquals(glyphType, gm.getType());
}
@@ -141,13 +129,13 @@
*/
public final void testGetRSB() {
GlyphMetrics gm = new GlyphMetrics(advance, bounds, glyphType);
- assertEquals(bounds.x, gm.getLSB());
+ assertEquals(bounds.x, gm.getLSB(), 0F);
boolean horizontal = false;
float advanceX = -5;
float advanceY = 5;
gm = new GlyphMetrics(horizontal, advanceX, advanceY, bounds, glyphType);
- assertEquals(bounds.y, gm.getLSB());
+ assertEquals(bounds.y, gm.getLSB(), 0F);
}
/*
@@ -155,13 +143,13 @@
*/
public final void testGetLSB() {
GlyphMetrics gm = new GlyphMetrics(advance, bounds, glyphType);
- assertEquals(advance - bounds.x - (float)bounds.getWidth(), gm.getRSB());
+ assertEquals(advance - bounds.x - (float)bounds.getWidth(), gm.getRSB(), 0F);
boolean horizontal = false;
float advanceX = -5;
float advanceY = 5;
gm = new GlyphMetrics(horizontal, advanceX, advanceY, bounds, glyphType);
- assertEquals(advanceY - bounds.y - (float)bounds.getHeight(), gm.getRSB());
+ assertEquals(advanceY - bounds.y - (float)bounds.getHeight(), gm.getRSB(), 0F);
}
/*
@@ -169,10 +157,10 @@
*/
public final void testGetAdvanceY() {
GlyphMetrics gm = new GlyphMetrics(advance, bounds, glyphType);
- assertEquals((float)0, gm.getAdvanceY());
+ assertEquals(0, gm.getAdvanceY(), 0F);
gm = new GlyphMetrics(true, 0, advance, bounds, glyphType);
- assertEquals(advance, gm.getAdvanceY());
+ assertEquals(advance, gm.getAdvanceY(), 0F);
}
@@ -181,10 +169,10 @@
*/
public final void testGetAdvanceX() {
GlyphMetrics gm = new GlyphMetrics(advance, bounds, glyphType);
- assertEquals(advance, gm.getAdvanceX());
+ assertEquals(advance, gm.getAdvanceX(), 0F);
gm = new GlyphMetrics(true, advance, 0, bounds, glyphType);
- assertEquals(advance, gm.getAdvanceX());
+ assertEquals(advance, gm.getAdvanceX(), 0F);
}
@@ -193,7 +181,7 @@
*/
public final void testGetAdvance() {
GlyphMetrics gm = new GlyphMetrics(advance, bounds, glyphType);
- assertEquals(advance, gm.getAdvance());
+ assertEquals(advance, gm.getAdvance(), 0F);
}
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/ImageGraphicAttributeTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/ImageGraphicAttributeTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/ImageGraphicAttributeTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/ImageGraphicAttributeTest.java Wed Oct 18 22:18:19 2006
@@ -32,18 +32,6 @@
int height = 10;
Image img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
int alignment = GraphicAttribute.ROMAN_BASELINE;
-
- public ImageGraphicAttributeTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
/*
* Test method for 'java.awt.font.ImageGraphicAttribute.getAdvance()'
@@ -54,10 +42,10 @@
float xOrigin1 = 15;
iga = new ImageGraphicAttribute(img, alignment, xOrigin, yOrigin);
- assertEquals(img.getWidth(null) - xOrigin, iga.getAdvance());
+ assertEquals(img.getWidth(null) - xOrigin, iga.getAdvance(), 0F);
iga = new ImageGraphicAttribute(img, alignment, xOrigin1, yOrigin);
- assertEquals((float)0, iga.getAdvance());
+ assertEquals(0, iga.getAdvance(), 0F);
}
/*
@@ -69,10 +57,10 @@
float yOrigin1 = -5;
iga = new ImageGraphicAttribute(img, alignment, xOrigin, yOrigin);
- assertEquals(yOrigin, iga.getAscent());
+ assertEquals(yOrigin, iga.getAscent(), 0F);
iga = new ImageGraphicAttribute(img, alignment, xOrigin, yOrigin1);
- assertEquals((float)0, iga.getAscent());
+ assertEquals(0, iga.getAscent(), 0F);
}
/*
@@ -100,10 +88,10 @@
float yOrigin1 = 15;
iga = new ImageGraphicAttribute(img, alignment, xOrigin, yOrigin);
- assertEquals(img.getHeight(null) - yOrigin, iga.getDescent());
+ assertEquals(img.getHeight(null) - yOrigin, iga.getDescent(), 0F);
iga = new ImageGraphicAttribute(img, alignment, xOrigin, yOrigin1);
- assertEquals((float)0, iga.getDescent());
+ assertEquals(0, iga.getDescent(), 0F);
}
@@ -114,9 +102,9 @@
ImageGraphicAttribute igAttribute = new ImageGraphicAttribute(img, alignment);
assertNotNull(igAttribute);
assertEquals(alignment, igAttribute.getAlignment());
- assertEquals((float)width, igAttribute.getAdvance());
- assertEquals((float)0, igAttribute.getAscent());
- assertEquals((float)height, igAttribute.getDescent());
+ assertEquals(width, igAttribute.getAdvance(), 0F);
+ assertEquals(0, igAttribute.getAscent(), 0F);
+ assertEquals(height, igAttribute.getDescent(), 0F);
assertEquals(new Rectangle2D.Float(0, 0, img.getWidth(null), img.getHeight(null)),
igAttribute.getBounds());
@@ -145,9 +133,9 @@
ImageGraphicAttribute igAttribute = new ImageGraphicAttribute(img, alignment, xOrigin, yOrigin);
assertNotNull(igAttribute);
assertEquals(alignment, igAttribute.getAlignment());
- assertEquals((float)width - xOrigin, igAttribute.getAdvance());
- assertEquals(yOrigin, igAttribute.getAscent());
- assertEquals((float)height - yOrigin, igAttribute.getDescent());
+ assertEquals(width - xOrigin, igAttribute.getAdvance(), 0F);
+ assertEquals(yOrigin, igAttribute.getAscent(), 0F);
+ assertEquals(height - yOrigin, igAttribute.getDescent(), 0F);
assertEquals(new Rectangle2D.Float(-xOrigin, -yOrigin, img.getWidth(null), img.getHeight(null)),
igAttribute.getBounds());
@@ -182,7 +170,7 @@
public final void testEqualsObject() {
iga = new ImageGraphicAttribute(img, alignment);
ImageGraphicAttribute iga1 = new ImageGraphicAttribute(img, alignment);
- assertEquals(iga, (Object)iga1);
+ assertEquals(iga, iga1);
}
/*
@@ -214,15 +202,15 @@
}
private boolean equalsGlyphJustificationInfo(GlyphJustificationInfo info1, GlyphJustificationInfo info2){
- assertEquals("weight", info1.weight, info2.weight);
+ assertEquals("weight", info1.weight, info2.weight, 0F);
assertEquals("growAbsorb", info1.growAbsorb, info2.growAbsorb);
assertEquals("growPriority", info1.growPriority, info2.growPriority);
- assertEquals("growLeftLimit", info1.growLeftLimit, info2.growLeftLimit);
- assertEquals("growRightLimit", info1.growRightLimit, info2.growRightLimit);
+ assertEquals("growLeftLimit", info1.growLeftLimit, info2.growLeftLimit, 0F);
+ assertEquals("growRightLimit", info1.growRightLimit, info2.growRightLimit, 0F);
assertEquals("shrinkAbsorb", info1.shrinkAbsorb, info2.shrinkAbsorb);
assertEquals("shrinkPriority", info1.shrinkPriority, info2.shrinkPriority);
- assertEquals("shrinkLeftLimit", info1.shrinkLeftLimit, info2.shrinkLeftLimit);
- assertEquals("shrinkRightLimit", info1.shrinkRightLimit, info2.shrinkRightLimit);
+ assertEquals("shrinkLeftLimit", info1.shrinkLeftLimit, info2.shrinkLeftLimit, 0F);
+ assertEquals("shrinkRightLimit", info1.shrinkRightLimit, info2.shrinkRightLimit, 0F);
return true;
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/NumericShaperTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/NumericShaperTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/NumericShaperTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/NumericShaperTest.java Wed Oct 18 22:18:19 2006
@@ -47,10 +47,12 @@
super(name);
}
+ @Override
protected void setUp() throws Exception {
super.setUp();
}
+ @Override
protected void tearDown() throws Exception {
super.tearDown();
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/ShapeGraphicAttributeTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/ShapeGraphicAttributeTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/ShapeGraphicAttributeTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/ShapeGraphicAttributeTest.java Wed Oct 18 22:18:19 2006
@@ -41,25 +41,17 @@
super(name);
}
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
/*
* Test method for 'java.awt.font.ShapeGraphicAttribute.getAdvance()'
*/
public final void testGetAdvance() {
sga = new ShapeGraphicAttribute(shape, alignment, stroke);
- assertEquals((float)shape.getBounds2D().getWidth() + xOrigin, sga.getAdvance());
+ assertEquals((float)shape.getBounds2D().getWidth() + xOrigin, sga.getAdvance(), 0F);
Shape trShape = AffineTransform.getTranslateInstance(-20, 0).createTransformedShape(shape);
sga = new ShapeGraphicAttribute(trShape, alignment, stroke);
- assertEquals((float)0, sga.getAdvance());
+ assertEquals(0, sga.getAdvance(), 0F);
}
/*
@@ -67,11 +59,11 @@
*/
public final void testGetAscent() {
sga = new ShapeGraphicAttribute(shape, alignment, stroke);
- assertEquals((float)0, sga.getAscent());
+ assertEquals(0, sga.getAscent(), 0F);
Shape trShape = AffineTransform.getTranslateInstance(0, -30).createTransformedShape(shape);
sga = new ShapeGraphicAttribute(trShape, alignment, stroke);
- assertEquals(-(float)trShape.getBounds2D().getMinY(), sga.getAscent());
+ assertEquals(-(float)trShape.getBounds2D().getMinY(), sga.getAscent(), 0F);
}
@@ -90,11 +82,11 @@
*/
public final void testGetDescent() {
sga = new ShapeGraphicAttribute(shape, alignment, stroke);
- assertEquals((float)shape.getBounds2D().getMinY() + height, sga.getDescent());
+ assertEquals((float)shape.getBounds2D().getMinY() + height, sga.getDescent(), 0F);
Shape trShape = AffineTransform.getTranslateInstance(0, -30).createTransformedShape(shape);
sga = new ShapeGraphicAttribute(trShape, alignment, stroke);
- assertEquals((float)0, sga.getDescent());
+ assertEquals(0, sga.getDescent(), 0F);
}
/*
@@ -104,9 +96,9 @@
ShapeGraphicAttribute shAttribute = new ShapeGraphicAttribute(shape, alignment, stroke);
assertNotNull(shAttribute);
assertEquals(alignment, shAttribute.getAlignment());
- assertEquals((float)shape.getBounds2D().getMaxX(), shAttribute.getAdvance());
- assertEquals((float)0, shAttribute.getAscent());
- assertEquals((float)shape.getBounds2D().getMinY() + height, shAttribute.getDescent());
+ assertEquals((float)shape.getBounds2D().getMaxX(), shAttribute.getAdvance(), 0F);
+ assertEquals(0, shAttribute.getAscent(), 0F);
+ assertEquals((float)shape.getBounds2D().getMinY() + height, shAttribute.getDescent(), 0F);
Rectangle2D.Float bounds = (Rectangle2D.Float)shape.getBounds2D();
if (stroke == ShapeGraphicAttribute.STROKE){
@@ -178,15 +170,15 @@
}
private boolean equalsGlyphJustificationInfo(GlyphJustificationInfo info1, GlyphJustificationInfo info2){
- assertEquals("weight", info1.weight, info2.weight);
+ assertEquals("weight", info1.weight, info2.weight, 0F);
assertEquals("growAbsorb", info1.growAbsorb, info2.growAbsorb);
assertEquals("growPriority", info1.growPriority, info2.growPriority);
- assertEquals("growLeftLimit", info1.growLeftLimit, info2.growLeftLimit);
- assertEquals("growRightLimit", info1.growRightLimit, info2.growRightLimit);
+ assertEquals("growLeftLimit", info1.growLeftLimit, info2.growLeftLimit, 0F);
+ assertEquals("growRightLimit", info1.growRightLimit, info2.growRightLimit, 0F);
assertEquals("shrinkAbsorb", info1.shrinkAbsorb, info2.shrinkAbsorb);
assertEquals("shrinkPriority", info1.shrinkPriority, info2.shrinkPriority);
- assertEquals("shrinkLeftLimit", info1.shrinkLeftLimit, info2.shrinkLeftLimit);
- assertEquals("shrinkRightLimit", info1.shrinkRightLimit, info2.shrinkRightLimit);
+ assertEquals("shrinkLeftLimit", info1.shrinkLeftLimit, info2.shrinkLeftLimit, 0F);
+ assertEquals("shrinkRightLimit", info1.shrinkRightLimit, info2.shrinkRightLimit, 0F);
return true;
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/TransformAttributeTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/TransformAttributeTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/TransformAttributeTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/TransformAttributeTest.java Wed Oct 18 22:18:19 2006
@@ -28,10 +28,12 @@
super(name);
}
+ @Override
protected void setUp() throws Exception {
super.setUp();
}
+ @Override
protected void tearDown() throws Exception {
super.tearDown();
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownThreadTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownThreadTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownThreadTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownThreadTest.java Wed Oct 18 22:18:19 2006
@@ -30,6 +30,7 @@
junit.textui.TestRunner.run(ShutdownThreadTest.class);
}
+ @Override
protected void setUp() throws Exception {
super.setUp();
t = new ShutdownThread();
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownWatchdogTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownWatchdogTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownWatchdogTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownWatchdogTest.java Wed Oct 18 22:18:19 2006
@@ -30,6 +30,7 @@
junit.textui.TestRunner.run(ShutdownWatchdogTest.class);
}
+ @Override
protected void setUp() throws Exception {
super.setUp();
wd = new ShutdownWatchdog();
@@ -107,9 +108,9 @@
}
threads = new Thread[actualCount + 1];
}
- for (int i = 0; i < threads.length; i++) {
- if ((threads[i] != null) &&
- threads[i].getName().equals("AWT-Shutdown")) {
+ for (Thread element : threads) {
+ if ((element != null) &&
+ element.getName().equals("AWT-Shutdown")) {
return true;
}
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/SynchronizerTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/SynchronizerTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/SynchronizerTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/SynchronizerTest.java Wed Oct 18 22:18:19 2006
@@ -37,6 +37,7 @@
junit.textui.TestRunner.run(SynchronizerTest.class);
}
+ @Override
protected void setUp() throws Exception {
super.setUp();