You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Show only the \"Test Passed\" message when a test passes
This restores the behaviour of how `@test` shows
a test pass in Julia v1.0 - v1.6, reverting the
display changes that resulted when we began storing
more info in the `Pass` type in JuliaLang#36879.
ClosesJuliaLang#43794.
Copy file name to clipboardExpand all lines: stdlib/Test/docs/src/index.md
-9Lines changed: 0 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -43,13 +43,9 @@ If the condition is true, a `Pass` is returned:
43
43
```jldoctest testfoo
44
44
julia> @test foo("bar") == 9
45
45
Test Passed
46
-
Expression: foo("bar") == 9
47
-
Evaluated: 9 == 9
48
46
49
47
julia> @test foo("fizz") >= 10
50
48
Test Passed
51
-
Expression: foo("fizz") >= 10
52
-
Evaluated: 16 >= 10
53
49
```
54
50
55
51
If the condition is false, then a `Fail` is returned and an exception is thrown:
@@ -88,7 +84,6 @@ to check that this occurs:
88
84
```jldoctest testfoo
89
85
julia> @test_throws MethodError foo(:cat)
90
86
Test Passed
91
-
Expression: foo(:cat)
92
87
Thrown: MethodError
93
88
```
94
89
@@ -214,8 +209,6 @@ checks using either `@test a ≈ b` (where `≈`, typed via tab completion of `\
214
209
```jldoctest
215
210
julia> @test 1 ≈ 0.999999999
216
211
Test Passed
217
-
Expression: 1 ≈ 0.999999999
218
-
Evaluated: 1 ≈ 0.999999999
219
212
220
213
julia> @test 1 ≈ 0.999999
221
214
Test Failed at none:1
@@ -228,8 +221,6 @@ after the `≈` comparison:
228
221
```jldoctest
229
222
julia> @test 1 ≈ 0.999999 rtol=1e-5
230
223
Test Passed
231
-
Expression: ≈(1, 0.999999, rtol = 1.0e-5)
232
-
Evaluated: ≈(1, 0.999999; rtol = 1.0e-5)
233
224
```
234
225
Note that this is not a specific feature of the `≈` but rather a general feature of the `@test` macro: `@test a <op> b key=val` is transformed by the macro into `@test op(a, b, key=val)`. It is, however, particularly useful for `≈` tests.
0 commit comments