29
29
30
30
package net .imagej .ops .image .ascii ;
31
31
32
- import static org .junit .Assert .assertTrue ;
32
+ import static org .junit .Assert .assertEquals ;
33
+ import static org .junit .Assert .assertNotEquals ;
33
34
34
35
import net .imagej .ops .AbstractOpTest ;
35
36
import net .imglib2 .img .Img ;
@@ -64,9 +65,9 @@ public void testDefaultASCII() {
64
65
final String ascii = (String ) ops .run (DefaultASCII .class , img );
65
66
for (int i = 0 ; i < len ; i ++) {
66
67
for (int j = 0 ; j < width ; j ++) {
67
- assertTrue (ascii .charAt (i * (width + 1 ) + j ) == CHARS .charAt (i ));
68
+ assertEquals (ascii .charAt (i * (width + 1 ) + j ), CHARS .charAt (i ));
68
69
}
69
- assertTrue (ascii .charAt (i * (width + 1 ) + width ) == '\n' );
70
+ assertEquals (ascii .charAt (i * (width + 1 ) + width ), '\n' );
70
71
}
71
72
}
72
73
@@ -89,16 +90,16 @@ public void testASCIIMinMax() {
89
90
final String ascii = (String ) ops .run (DefaultASCII .class , img , min , max );
90
91
for (int i = 0 ; i < len ; i ++) {
91
92
for (int j = 0 ; j < width ; j ++) {
92
- assertTrue (ascii .charAt (i * (width + 1 ) + j ) == CHARS .charAt (i ));
93
+ assertEquals (ascii .charAt (i * (width + 1 ) + j ), CHARS .charAt (i ));
93
94
}
94
- assertTrue (ascii .charAt (i * (width + 1 ) + width ) == '\n' );
95
+ assertEquals (ascii .charAt (i * (width + 1 ) + width ), '\n' );
95
96
}
96
97
97
98
// make sure that the clamped ASCII string is not equivalent to the
98
99
// unclamped String
99
100
final String asciiUnclamped = (String ) ops .run (DefaultASCII .class , img );
100
101
101
- assertTrue (asciiUnclamped != ascii );
102
+ assertNotEquals (asciiUnclamped , ascii );
102
103
103
104
}
104
105
}
0 commit comments