Skip to content

Commit 7bf05f5

Browse files
author
Bruce Eckel
committed
Output update and exclude AttemptLocking for Appveyor
1 parent 3febbb2 commit 7bf05f5

File tree

123 files changed

+665
-671
lines changed

Some content is hidden

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

123 files changed

+665
-671
lines changed

ShowFindbugs.py

Lines changed: 0 additions & 10 deletions
This file was deleted.

_verify_output.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
# Requires Python 3.5
33
# Validates output from executable Java programs in "On Java 8."
44
# Use chain of responsibility to successively try strategies until one matches
5+
'''
6+
Intended to be copied into the ExtractedExamples directory,
7+
thus it doesn't use config.py
8+
'''
59
from pathlib import Path
610
import textwrap
711
import re

annotations/AtUnitComposition.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ boolean tMethodTwo() {
2323
}
2424
/* Output:
2525
annotations.AtUnitComposition
26-
. tMethodOne
2726
. tMethodTwo This is methodTwo
2827
28+
. tMethodOne
2929
OK (2 tests)
3030
*/

annotations/AtUnitExample1.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ boolean anotherDisappointment() {
3434
}
3535
/* Output:
3636
annotations.AtUnitExample1
37-
. anotherDisappointment (failed)
3837
. m2 This is methodTwo
3938
4039
. m3
4140
. failureTest (failed)
4241
. methodOneTest
42+
. anotherDisappointment (failed)
4343
(5 tests)
4444
4545
>>> 2 FAILURES <<<
46-
annotations.AtUnitExample1: anotherDisappointment
4746
annotations.AtUnitExample1: failureTest
47+
annotations.AtUnitExample1: anotherDisappointment
4848
*/

annotations/AtUnitExample2.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,18 @@ boolean assertAndReturn() {
4040
}
4141
/* Output:
4242
annotations.AtUnitExample2
43-
. assertFailureExample java.lang.AssertionError: What a
44-
surprise!
45-
(failed)
4643
. assertExample
4744
. exceptionExample java.io.FileNotFoundException:
4845
nofile.txt (The system cannot find the file specified)
4946
(failed)
5047
. assertAndReturn This is methodTwo
5148
49+
. assertFailureExample java.lang.AssertionError: What a
50+
surprise!
51+
(failed)
5252
(4 tests)
5353
5454
>>> 2 FAILURES <<<
55-
annotations.AtUnitExample2: assertFailureExample
5655
annotations.AtUnitExample2: exceptionExample
56+
annotations.AtUnitExample2: assertFailureExample
5757
*/

annotations/AtUnitExample3.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ boolean methodOneTest() {
3434
}
3535
/* Output:
3636
annotations.AtUnitExample3
37-
. m2 This is methodTwo
38-
3937
. methodOneTest
4038
. initialization
39+
. m2 This is methodTwo
40+
4141
OK (3 tests)
4242
*/

annotations/AtUnitExample4.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,15 @@ boolean scramble2() {
6767
annotations.AtUnitExample4
6868
. words 'All'
6969
(failed)
70-
. scramble1 'brontosauruses'
71-
ntsaueorosurbs
72-
(failed)
73-
. scramble2 'are'
74-
are
70+
. scramble2 'brontosauruses'
71+
tsaeborornussu
72+
73+
. scramble1 'are'
74+
rae
7575
(failed)
7676
(3 tests)
7777
78-
>>> 3 FAILURES <<<
78+
>>> 2 FAILURES <<<
7979
annotations.AtUnitExample4: words
8080
annotations.AtUnitExample4: scramble1
81-
annotations.AtUnitExample4: scramble2
8281
*/

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
5856
. test3
5957
Running cleanup
6058
. test2
59+
Running cleanup
60+
. test1
6161
Running cleanup
6262
OK (3 tests)
6363
*/

annotations/AtUnitExternalTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ boolean tMethodTwo() {
2222
}
2323
/* Output:
2424
annotations.AtUnitExternalTest
25+
. tMethodOne
2526
. tMethodTwo This is methodTwo
2627
27-
. tMethodOne
2828
OK (2 tests)
2929
*/

annotations/HashSetTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ void tRemove() {
2929
}
3030
/* Output:
3131
annotations.HashSetTest
32-
. tRemove
33-
. tContains
3432
. initialization
33+
. tContains
34+
. tRemove
3535
OK (3 tests)
3636
*/

0 commit comments

Comments
 (0)