Skip to content

Commit edd9988

Browse files
author
Bruce Eckel
committed
Narrowed listing widths, fixed output
Also removed Preferences appendix
1 parent 0d20d3e commit edd9988

File tree

257 files changed

+1252
-1206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

257 files changed

+1252
-1206
lines changed

annotations/AtUnitComposition.java renamed to annotations/AUComposition.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
// annotations/AtUnitComposition.java
1+
// annotations/AUComposition.java
22
// (c)2017 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// Creating non-embedded tests
66
// {java onjava.atunit.AtUnit
7-
// build/classes/main/annotations/AtUnitComposition.class}
7+
// build/classes/main/annotations/AUComposition.class}
88
package annotations;
99
import onjava.atunit.*;
1010
import onjava.*;
1111

12-
public class AtUnitComposition {
12+
public class AUComposition {
1313
AtUnitExample1 testObject = new AtUnitExample1();
1414
@Test
1515
boolean tMethodOne() {
@@ -22,7 +22,7 @@ boolean tMethodTwo() {
2222
}
2323
}
2424
/* Output:
25-
annotations.AtUnitComposition
25+
annotations.AUComposition
2626
. tMethodTwo This is methodTwo
2727
2828
. tMethodOne

annotations/AtUnitExternalTest.java renamed to annotations/AUExternalTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
// annotations/AtUnitExternalTest.java
1+
// annotations/AUExternalTest.java
22
// (c)2017 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// Creating non-embedded tests
66
// {java onjava.atunit.AtUnit
7-
// build/classes/main/annotations/AtUnitExternalTest.class}
7+
// build/classes/main/annotations/AUExternalTest.class}
88
package annotations;
99
import onjava.atunit.*;
1010
import onjava.*;
1111

1212
public class
13-
AtUnitExternalTest extends AtUnitExample1 {
13+
AUExternalTest extends AtUnitExample1 {
1414
@Test
1515
boolean tMethodOne() {
1616
return methodOne().equals("This is methodOne");
@@ -21,7 +21,7 @@ boolean tMethodTwo() {
2121
}
2222
}
2323
/* Output:
24-
annotations.AtUnitExternalTest
24+
annotations.AUExternalTest
2525
. tMethodOne
2626
. tMethodTwo This is methodTwo
2727

annotations/AtUnitExample1.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ boolean anotherDisappointment() {
3434
}
3535
/* Output:
3636
annotations.AtUnitExample1
37+
. m3
38+
. methodOneTest
3739
. m2 This is methodTwo
3840
39-
. m3
4041
. failureTest (failed)
41-
. methodOneTest
4242
. anotherDisappointment (failed)
4343
(5 tests)
4444

annotations/AtUnitExample2.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ boolean assertAndReturn() {
4040
}
4141
/* Output:
4242
annotations.AtUnitExample2
43-
. assertExample
4443
. exceptionExample java.io.FileNotFoundException:
4544
nofile.txt (The system cannot find the file specified)
4645
(failed)
46+
. assertExample
4747
. assertAndReturn This is methodTwo
4848
49-
. assertFailureExample java.lang.AssertionError: What a
50-
surprise!
49+
. assertFailureExample java.lang.AssertionError: What
50+
a surprise!
5151
(failed)
5252
(4 tests)
5353

annotations/AtUnitExample3.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ boolean methodOneTest() {
3434
}
3535
/* Output:
3636
annotations.AtUnitExample3
37-
. methodOneTest
3837
. initialization
3938
. m2 This is methodTwo
4039
40+
. methodOneTest
4141
OK (3 tests)
4242
*/

annotations/AtUnitExample4.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// Visit http://OnJava8.com for more book information.
55
// {java onjava.atunit.AtUnit
66
// build/classes/main/annotations/AtUnitExample4.class}
7+
// {VisuallyInspectOutput}
78
package annotations;
89
import java.util.*;
910
import onjava.atunit.*;
@@ -67,15 +68,16 @@ boolean scramble2() {
6768
annotations.AtUnitExample4
6869
. words 'All'
6970
(failed)
70-
. scramble2 'brontosauruses'
71-
tsaeborornussu
72-
73-
. scramble1 'are'
74-
rae
71+
. scramble1 'brontosauruses'
72+
ntsaueorosurbs
73+
(failed)
74+
. scramble2 'are'
75+
are
7576
(failed)
7677
(3 tests)
7778
78-
>>> 2 FAILURES <<<
79+
>>> 3 FAILURES <<<
7980
annotations.AtUnitExample4: words
8081
annotations.AtUnitExample4: scramble1
82+
annotations.AtUnitExample4: scramble2
8183
*/

annotations/AtUnitExample5.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ boolean test3() {
5353
}
5454
/* Output:
5555
annotations.AtUnitExample5
56+
. test1
57+
Running cleanup
5658
. test3
5759
Running cleanup
5860
. test2
59-
Running cleanup
60-
. test1
6161
Running cleanup
6262
OK (3 tests)
6363
*/

annotations/HashSetTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void tRemove() {
3030
/* Output:
3131
annotations.HashSetTest
3232
. initialization
33-
. tContains
3433
. tRemove
34+
. tContains
3535
OK (3 tests)
3636
*/

annotations/StackLStringTest.java renamed to annotations/StackLStringTst.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
// annotations/StackLStringTest.java
1+
// annotations/StackLStringTst.java
22
// (c)2017 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// Applying @Unit to generics
66
// {java onjava.atunit.AtUnit
7-
// build/classes/main/annotations/StackLStringTest.class}
7+
// build/classes/main/annotations/StackLStringTst.class}
88
package annotations;
99
import onjava.atunit.*;
1010
import onjava.*;
1111

1212
public class
13-
StackLStringTest extends StackL<String> {
13+
StackLStringTst extends StackL<String> {
1414
@Test
1515
void tPush() {
1616
push("one");
@@ -34,9 +34,9 @@ void tTop() {
3434
}
3535
}
3636
/* Output:
37-
annotations.StackLStringTest
38-
. tPop
37+
annotations.StackLStringTst
3938
. tTop
4039
. tPush
40+
. tPop
4141
OK (3 tests)
4242
*/

annotations/UseCaseTracker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ public static void main(String[] args) {
2727
}
2828
}
2929
/* Output:
30-
Found Use Case 47
31-
Passwords must contain at least one numeric
3230
Found Use Case 48
3331
no description
32+
Found Use Case 47
33+
Passwords must contain at least one numeric
3434
Found Use Case 49
3535
New passwords can't equal previously used ones
3636
Missing use case 50

0 commit comments

Comments
 (0)